home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / xlib.h.old < prev    next >
Text File  |  1999-01-01  |  102KB  |  4,370 lines

  1. /* $XConsortium: Xlib.h,v 11.215 91/07/22 15:42:38 rws Exp $ */
  2. /* 
  3.  * Copyright 1985, 1986, 1987, 1991 by the Massachusetts Institute of Technology
  4.  *
  5.  * Permission to use, copy, modify, and distribute this software and its
  6.  * documentation for any purpose and without fee is hereby granted, provided 
  7.  * that the above copyright notice appear in all copies and that both that 
  8.  * copyright notice and this permission notice appear in supporting 
  9.  * documentation, and that the name of M.I.T. not be used in advertising
  10.  * or publicity pertaining to distribution of the software without specific, 
  11.  * written prior permission. M.I.T. makes no representations about the 
  12.  * suitability of this software for any purpose.  It is provided "as is"
  13.  * without express or implied warranty.
  14.  *
  15.  * X Window System is a Trademark of MIT.
  16.  *
  17.  */
  18.  
  19.  
  20. /*
  21.  *    Xlib.h - Header definition and support file for the C subroutine
  22.  *    interface library (Xlib) to the X Window System Protocol (V11).
  23.  *    Structures and symbols starting with "_" are private to the library.
  24.  */
  25. #ifndef _XLIB_H_
  26. #define _XLIB_H_
  27.  
  28. #define XlibSpecificationRelease 5
  29.  
  30. #define strncasecmp strnicmp
  31. #define strcasecmp stricmp
  32.  
  33. #ifdef USG
  34. #ifndef __TYPES__
  35. #include <sys/types.h>            /* forgot to protect it... */
  36. #define __TYPES__
  37. #endif /* __TYPES__ */
  38. #else
  39. #if defined(_POSIX_SOURCE) && defined(MOTOROLA)
  40. #undef _POSIX_SOURCE
  41. #include <sys/types.h>
  42. #define _POSIX_SOURCE
  43. #else
  44. #include <sys/types.h>
  45. #endif
  46. #endif /* USG */
  47.  
  48. #include <X11/X.h>
  49.  
  50. /* applications should not depend on these two headers being included! */
  51. #include <X11/Xfuncproto.h>
  52. #include <X11/Xosdefs.h>
  53.  
  54. #ifndef X_WCHAR
  55. #ifdef X_NOT_STDC_ENV
  56. #define X_WCHAR
  57. #endif
  58. #endif
  59.  
  60. #ifndef X_WCHAR
  61. #include <stddef.h>
  62. #else
  63. /* replace this with #include or typedef appropriate for your system */
  64. typedef unsigned long wchar_t;
  65. #endif
  66.  
  67. typedef char *XPointer;
  68.  
  69. #ifdef AMIGA
  70. #include <exec/types.h>
  71. #include <devices/timer.h>
  72. /*
  73. #define tv_sec tv_secs
  74. #define tv_usec tv_micro
  75. */
  76. #endif
  77.  
  78. #define Bool int
  79. #define Status int
  80. #define True 1
  81. #define False 0
  82.  
  83. #define QueuedAlready 0
  84. #define QueuedAfterReading 1
  85. #define QueuedAfterFlush 2
  86.  
  87. #define ConnectionNumber(dpy)     ((dpy)->fd)
  88. #define RootWindow(dpy, scr)     (((dpy)->screens[(scr)]).root)
  89. #define DefaultScreen(dpy)     ((dpy)->default_screen)
  90. #define DefaultRootWindow(dpy)     (((dpy)->screens[(dpy)->default_screen]).root)
  91. #define DefaultVisual(dpy, scr) (((dpy)->screens[(scr)]).root_visual)
  92. #define DefaultGC(dpy, scr)     (((dpy)->screens[(scr)]).default_gc)
  93. #define BlackPixel(dpy, scr)     (((dpy)->screens[(scr)]).black_pixel)
  94. #define WhitePixel(dpy, scr)     (((dpy)->screens[(scr)]).white_pixel)
  95. #define AllPlanes         ((unsigned long)~0L)
  96. #define QLength(dpy)         ((dpy)->qlen)
  97. #define DisplayWidth(dpy, scr)     (((dpy)->screens[(scr)]).width)
  98. #define DisplayHeight(dpy, scr) (((dpy)->screens[(scr)]).height)
  99. #define DisplayWidthMM(dpy, scr) (((dpy)->screens[(scr)]).mwidth)
  100. #define DisplayHeightMM(dpy, scr) (((dpy)->screens[(scr)]).mheight)
  101. #define DisplayPlanes(dpy, scr) (((dpy)->screens[(scr)]).root_depth)
  102. #define DisplayCells(dpy, scr)     (DefaultVisual((dpy), (scr))->map_entries)
  103. #define ScreenCount(dpy)     ((dpy)->nscreens)
  104. #define ServerVendor(dpy)     ((dpy)->vendor)
  105. #define ProtocolVersion(dpy)     ((dpy)->proto_major_version)
  106. #define ProtocolRevision(dpy)     ((dpy)->proto_minor_version)
  107. #define VendorRelease(dpy)     ((dpy)->release)
  108. #define DisplayString(dpy)     ((dpy)->display_name)
  109. #define DefaultDepth(dpy, scr)     (((dpy)->screens[(scr)]).root_depth)
  110. #define DefaultColormap(dpy, scr) (((dpy)->screens[(scr)]).cmap)
  111. #define BitmapUnit(dpy)     ((dpy)->bitmap_unit)
  112. #define BitmapBitOrder(dpy)     ((dpy)->bitmap_bit_order)
  113. #define BitmapPad(dpy)         ((dpy)->bitmap_pad)
  114. #define ImageByteOrder(dpy)     ((dpy)->byte_order)
  115. #define NextRequest(dpy)    ((dpy)->request + 1)
  116. #define LastKnownRequestProcessed (dpy)    ((dpy)->last_request_read)
  117.  
  118. /* macros for screen oriented applications (toolkit) */
  119. #define ScreenOfDisplay(dpy, scr) (&((dpy)->screens[(scr)]))
  120. #define DefaultScreenOfDisplay(dpy) (&((dpy)->screens[(dpy)->default_screen]))
  121. #define DisplayOfScreen(s)    ((s)->display)
  122. #define RootWindowOfScreen(s)    ((s)->root)
  123. #define BlackPixelOfScreen(s)    ((s)->black_pixel)
  124. #define WhitePixelOfScreen(s)    ((s)->white_pixel)
  125. #define DefaultColormapOfScreen(s) ((s)->cmap)
  126. #define DefaultDepthOfScreen(s)    ((s)->root_depth)
  127. #define DefaultGCOfScreen(s)    ((s)->default_gc)
  128. #define DefaultVisualOfScreen(s) ((s)->root_visual)
  129. #define WidthOfScreen(s)    ((s)->width)
  130. #define HeightOfScreen(s)    ((s)->height)
  131. #define WidthMMOfScreen(s)    ((s)->mwidth)
  132. #define HeightMMOfScreen(s)    ((s)->mheight)
  133. #define PlanesOfScreen(s)    ((s)->root_depth)
  134. #define CellsOfScreen(s)    (DefaultVisualOfScreen((s))->map_entries)
  135. #define MinCmapsOfScreen(s)    ((s)->min_maps)
  136. #define MaxCmapsOfScreen(s)    ((s)->max_maps)
  137. #define DoesSaveUnders(s)    ((s)->save_unders)
  138. #define DoesBackingStore(s)    ((s)->backing_store)
  139. #define EventMaskOfScreen(s)    ((s)->root_input_mask)
  140.  
  141. /*
  142.  * Extensions need a way to hang private data on some structures.
  143.  */
  144. typedef struct _XExtData {
  145.     int number;        /* number returned by XRegisterExtension */
  146.     struct _XExtData *next;    /* next item on list of data for structure */
  147.     int (*free_private)();    /* called to free private storage */
  148.     XPointer private_data;    /* data private to this extension. */
  149. } XExtData;
  150.  
  151. /*
  152.  * This file contains structures used by the extension mechanism.
  153.  */
  154. typedef struct {        /* public to extension, cannot be changed */
  155.     int extension;        /* extension number */
  156.     int major_opcode;    /* major op-code assigned by server */
  157.     int first_event;    /* first event number for the extension */
  158.     int first_error;    /* first error number for the extension */
  159. } XExtCodes;
  160.  
  161. /*
  162.  * Data structure for retrieving info about pixmap formats.
  163.  */
  164.  
  165. typedef struct {
  166.     int depth;
  167.     int bits_per_pixel;
  168.     int scanline_pad;
  169. } XPixmapFormatValues;
  170.  
  171.  
  172. /*
  173.  * Data structure for setting graphics context.
  174.  */
  175. typedef struct {
  176.     int function;        /* logical operation */
  177.     unsigned long plane_mask;/* plane mask */
  178.     unsigned long foreground;/* foreground pixel */
  179.     unsigned long background;/* background pixel */
  180.     int line_width;        /* line width */
  181.     int line_style;         /* LineSolid, LineOnOffDash, LineDoubleDash */
  182.     int cap_style;          /* CapNotLast, CapButt, 
  183.                    CapRound, CapProjecting */
  184.     int join_style;         /* JoinMiter, JoinRound, JoinBevel */
  185.     int fill_style;         /* FillSolid, FillTiled, 
  186.                    FillStippled, FillOpaeueStippled */
  187.     int fill_rule;          /* EvenOddRule, WindingRule */
  188.     int arc_mode;        /* ArcChord, ArcPieSlice */
  189.     Pixmap tile;        /* tile pixmap for tiling operations */
  190.     Pixmap stipple;        /* stipple 1 plane pixmap for stipping */
  191.     int ts_x_origin;    /* offset for tile or stipple operations */
  192.     int ts_y_origin;
  193.         Font font;            /* default text font for text operations */
  194.     int subwindow_mode;     /* ClipByChildren, IncludeInferiors */
  195.     Bool graphics_exposures;/* boolean, should exposures be generated */
  196.     int clip_x_origin;    /* origin for clipping */
  197.     int clip_y_origin;
  198.     Pixmap clip_mask;    /* bitmap clipping; other calls for rects */
  199.     int dash_offset;    /* patterned/dashed line information */
  200.     char dashes;
  201. } XGCValues;
  202.  
  203. /*
  204.  * Graphics context.  The contents of this structure are implementation
  205.  * dependent.  A GC should be treated as opaque by application code.
  206.  */
  207.  
  208. typedef struct _XGC {
  209.     XExtData *ext_data;    /* hook for extension to hang data */
  210.     GContext gid;    /* protocol ID for graphics context */
  211.     Bool rects;        /* boolean: TRUE if clipmask is list of rectangles */
  212.     Bool dashes;    /* boolean: TRUE if dash-list is really a list */
  213.     unsigned long dirty;/* cache dirty bits */
  214.     XGCValues values;    /* shadow structure of values */
  215. } *GC;
  216.  
  217.  
  218. /*
  219.  * Visual structure; contains information about colormapping possible.
  220.  */
  221. typedef struct {
  222.     XExtData *ext_data;    /* hook for extension to hang data */
  223.     VisualID visualid;    /* visual id of this visual */
  224. #if defined(__cplusplus) || defined(c_plusplus)
  225.     int c_class;        /* C++ class of screen (monochrome, etc.) */
  226. #else
  227.     int class;        /* class of screen (monochrome, etc.) */
  228. #endif
  229.     unsigned long red_mask, green_mask, blue_mask;    /* mask values */
  230.     int bits_per_rgb;    /* log base 2 of distinct color values */
  231.     int map_entries;    /* color map entries */
  232. } Visual;
  233.  
  234. /*
  235.  * Depth structure; contains information for each possible depth.
  236.  */    
  237. typedef struct {
  238.     int depth;        /* this depth (Z) of the depth */
  239.     int nvisuals;        /* number of Visual types at this depth */
  240.     Visual *visuals;    /* list of visuals possible at this depth */
  241. } Depth;
  242.  
  243. /*
  244.  * Information about the screen.  The contents of this structure are
  245.  * implementation dependent.  A Screen should be treated as opaque
  246.  * by application code.
  247.  */
  248. typedef struct {
  249.     XExtData *ext_data;    /* hook for extension to hang data */
  250.     struct _XDisplay *display;/* back pointer to display structure */
  251.     Window root;        /* Root window id. */
  252.     int width, height;    /* width and height of screen */
  253.     int mwidth, mheight;    /* width and height of  in millimeters */
  254.     int ndepths;        /* number of depths possible */
  255.     Depth *depths;        /* list of allowable depths on the screen */
  256.     int root_depth;        /* bits per pixel */
  257.     Visual *root_visual;    /* root visual */
  258.     GC default_gc;        /* GC for the root root visual */
  259.     Colormap cmap;        /* default color map */
  260.     unsigned long white_pixel;
  261.     unsigned long black_pixel;    /* White and Black pixel values */
  262.     int max_maps, min_maps;    /* max and min color maps */
  263.     int backing_store;    /* Never, WhenMapped, Always */
  264.     Bool save_unders;    
  265.     long root_input_mask;    /* initial root input mask */
  266. } Screen;
  267.  
  268. /*
  269.  * Format structure; describes ZFormat data the screen will understand.
  270.  */
  271. typedef struct {
  272.     XExtData *ext_data;    /* hook for extension to hang data */
  273.     int depth;        /* depth of this image format */
  274.     int bits_per_pixel;    /* bits/pixel at this depth */
  275.     int scanline_pad;    /* scanline must padded to this multiple */
  276. } ScreenFormat;
  277.  
  278. /*
  279.  * Data structure for setting window attributes.
  280.  */
  281. typedef struct {
  282.     Pixmap background_pixmap;    /* background or None or ParentRelative */
  283.     unsigned long background_pixel;    /* background pixel */
  284.     Pixmap border_pixmap;    /* border of the window */
  285.     unsigned long border_pixel;    /* border pixel value */
  286.     int bit_gravity;        /* one of bit gravity values */
  287.     int win_gravity;        /* one of the window gravity values */
  288.     int backing_store;        /* NotUseful, WhenMapped, Always */
  289.     unsigned long backing_planes;/* planes to be preseved if possible */
  290.     unsigned long backing_pixel;/* value to use in restoring planes */
  291.     Bool save_under;        /* should bits under be saved? (popups) */
  292.     long event_mask;        /* set of events that should be saved */
  293.     long do_not_propagate_mask;    /* set of events that should not propagate */
  294.     Bool override_redirect;    /* boolean value for override-redirect */
  295.     Colormap colormap;        /* color map to be associated with window */
  296.     Cursor cursor;        /* cursor to be displayed (or None) */
  297. } XSetWindowAttributes;
  298.  
  299. typedef struct {
  300.     int x, y;            /* location of window */
  301.     int width, height;        /* width and height of window */
  302.     int border_width;        /* border width of window */
  303.     int depth;              /* depth of window */
  304.     Visual *visual;        /* the associated visual structure */
  305.     Window root;            /* root of screen containing window */
  306. #if defined(__cplusplus) || defined(c_plusplus)
  307.     int c_class;        /* C++ InputOutput, InputOnly*/
  308. #else
  309.     int class;            /* InputOutput, InputOnly*/
  310. #endif
  311.     int bit_gravity;        /* one of bit gravity values */
  312.     int win_gravity;        /* one of the window gravity values */
  313.     int backing_store;        /* NotUseful, WhenMapped, Always */
  314.     unsigned long backing_planes;/* planes to be preserved if possible */
  315.     unsigned long backing_pixel;/* value to be used when restoring planes */
  316.     Bool save_under;        /* boolean, should bits under be saved? */
  317.     Colormap colormap;        /* color map to be associated with window */
  318.     Bool map_installed;        /* boolean, is color map currently installed*/
  319.     int map_state;        /* IsUnmapped, IsUnviewable, IsViewable */
  320.     long all_event_masks;    /* set of events all people have interest in*/
  321.     long your_event_mask;    /* my event mask */
  322.     long do_not_propagate_mask; /* set of events that should not propagate */
  323.     Bool override_redirect;    /* boolean value for override-redirect */
  324.     Screen *screen;        /* back pointer to correct screen */
  325. } XWindowAttributes;
  326.  
  327. /*
  328.  * Data structure for host setting; getting routines.
  329.  *
  330.  */
  331.  
  332. typedef struct {
  333.     int family;        /* for example FamilyInternet */
  334.     int length;        /* length of address, in bytes */
  335.     char *address;        /* pointer to where to find the bytes */
  336. } XHostAddress;
  337.  
  338. /*
  339.  * Data structure for "image" data, used by image manipulation routines.
  340.  */
  341. typedef struct _XImage {
  342.     int width, height;        /* size of image */
  343.     int xoffset;        /* number of pixels offset in X direction */
  344.     int format;            /* XYBitmap, XYPixmap, ZPixmap */
  345.     char *data;            /* pointer to image data */
  346.     int byte_order;        /* data byte order, LSBFirst, MSBFirst */
  347.     int bitmap_unit;        /* quant. of scanline 8, 16, 32 */
  348.     int bitmap_bit_order;    /* LSBFirst, MSBFirst */
  349.     int bitmap_pad;        /* 8, 16, 32 either XY or ZPixmap */
  350.     int depth;            /* depth of image */
  351.     int bytes_per_line;        /* accelarator to next line */
  352.     int bits_per_pixel;        /* bits per pixel (ZPixmap) */
  353.     unsigned long red_mask;    /* bits in z arrangment */
  354.     unsigned long green_mask;
  355.     unsigned long blue_mask;
  356.     XPointer obdata;        /* hook for the object routines to hang on */
  357.     struct funcs {        /* image manipulation routines */
  358.     struct _XImage *(*create_image)();
  359. #if NeedFunctionPrototypes
  360. #ifdef __cplusplus
  361.     int (* destroy_image)        (struct _XImage *);
  362. #else
  363.     int (* __stdargs destroy_image)        (struct _XImage *);
  364. #endif
  365.     unsigned long (*get_pixel)  (struct _XImage *, int, int);
  366.     int (*put_pixel)            (struct _XImage *, int, int, unsigned long);
  367.     struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
  368.     int (*add_pixel)            (struct _XImage *, long);
  369. #else
  370.     int (* destroy_image)();
  371.     unsigned long (*get_pixel)();
  372.     int (*put_pixel)();
  373.     struct _XImage *(*sub_image)();
  374.     int (*add_pixel)();
  375. #endif
  376.     } f;
  377. } XImage;
  378.  
  379. /* 
  380.  * Data structure for XReconfigureWindow
  381.  */
  382. typedef struct {
  383.     int x, y;
  384.     int width, height;
  385.     int border_width;
  386.     Window sibling;
  387.     int stack_mode;
  388. } XWindowChanges;
  389.  
  390. /*
  391.  * Data structure used by color operations
  392.  */
  393. typedef struct {
  394.     unsigned long pixel;
  395.     unsigned short red, green, blue;
  396.     char flags;  /* do_red, do_green, do_blue */
  397.     char pad;
  398. } XColor;
  399.  
  400. /* 
  401.  * Data structures for graphics operations.  On most machines, these are
  402.  * congruent with the wire protocol structures, so reformatting the data
  403.  * can be avoided on these architectures.
  404.  */
  405. typedef struct {
  406.     short x1, y1, x2, y2;
  407. } XSegment;
  408.  
  409. typedef struct {
  410.     short x, y;
  411. } XPoint;
  412.     
  413. typedef struct {
  414.     short x, y;
  415.     unsigned short width, height;
  416. } XRectangle;
  417.     
  418. typedef struct {
  419.     short x, y;
  420.     unsigned short width, height;
  421.     short angle1, angle2;
  422. } XArc;
  423.  
  424.  
  425. /* Data structure for XChangeKeyboardControl */
  426.  
  427. typedef struct {
  428.         int key_click_percent;
  429.         int bell_percent;
  430.         int bell_pitch;
  431.         int bell_duration;
  432.         int led;
  433.         int led_mode;
  434.         int key;
  435.         int auto_repeat_mode;   /* On, Off, Default */
  436. } XKeyboardControl;
  437.  
  438. /* Data structure for XGetKeyboardControl */
  439.  
  440. typedef struct {
  441.         int key_click_percent;
  442.     int bell_percent;
  443.     unsigned int bell_pitch, bell_duration;
  444.     unsigned long led_mask;
  445.     int global_auto_repeat;
  446.     char auto_repeats[32];
  447. } XKeyboardState;
  448.  
  449. /* Data structure for XGetMotionEvents.  */
  450.  
  451. typedef struct {
  452.         Time time;
  453.     short x, y;
  454. } XTimeCoord;
  455.  
  456. /* Data structure for X{Set,Get}ModifierMapping */
  457.  
  458. typedef struct {
  459.      int max_keypermod;    /* The server's max # of keys per modifier */
  460.      KeyCode *modifiermap;    /* An 8 by max_keypermod array of modifiers */
  461. } XModifierKeymap;
  462.  
  463. /*
  464.  * Display datatype maintaining display specific data.
  465.  * The contents of this structure are implementation dependent.
  466.  * A Display should be treated as opaque by application code.
  467.  */
  468. typedef struct _XDisplay {
  469.     XExtData *ext_data;    /* hook for extension to hang data */
  470.     struct _XFreeFuncs *free_funcs; /* internal free functions */
  471.     int fd;            /* Network socket. */
  472.     int lock;        /* is someone in critical section? */
  473.     int proto_major_version;/* maj. version of server's X protocol */
  474.     int proto_minor_version;/* minor version of servers X protocol */
  475.     char *vendor;        /* vendor of the server hardware */
  476.         XID resource_base;    /* resource ID base */
  477.     XID resource_mask;    /* resource ID mask bits */
  478.     XID resource_id;    /* allocator current ID */
  479.     int resource_shift;    /* allocator shift to correct bits */
  480.     XID (*resource_alloc)(); /* allocator function */
  481.     int byte_order;        /* screen byte order, LSBFirst, MSBFirst */
  482.     int bitmap_unit;    /* padding and data requirements */
  483.     int bitmap_pad;        /* padding requirements on bitmaps */
  484.     int bitmap_bit_order;    /* LeastSignificant or MostSignificant */
  485.     int nformats;        /* number of pixmap formats in list */
  486.     ScreenFormat *pixmap_format;    /* pixmap format list */
  487.     int vnumber;        /* Xlib's X protocol version number. */
  488.     int release;        /* release of the server */
  489.     struct _XSQEvent *head, *tail;    /* Input event queue. */
  490.     int qlen;        /* Length of input event queue */
  491.     unsigned long last_request_read; /* seq number of last event read */
  492.     unsigned long request;    /* sequence number of last request. */
  493.     char *last_req;        /* beginning of last request, or dummy */
  494.     char *buffer;        /* Output buffer starting address. */
  495.     char *bufptr;        /* Output buffer index pointer. */
  496.     char *bufmax;        /* Output buffer maximum+1 address. */
  497.     unsigned max_request_size; /* maximum number 32 bit words in request*/
  498.     struct _XrmHashBucketRec *db;
  499.     int (*synchandler)();    /* Synchronization handler */
  500.     char *display_name;    /* "host:display" string used on this connect*/
  501.     int default_screen;    /* default screen for operations */
  502.     int nscreens;        /* number of screens on this server*/
  503.     Screen *screens;    /* pointer to list of screens */
  504.     unsigned long motion_buffer;    /* size of motion buffer */
  505.     Window current;        /* for use internally for Keymap notify */
  506.     int min_keycode;    /* minimum defined keycode */
  507.     int max_keycode;    /* maximum defined keycode */
  508.     KeySym *keysyms;    /* This server's keysyms */
  509.     XModifierKeymap *modifiermap;    /* This server's modifier keymap */
  510.     int keysyms_per_keycode;/* number of rows */
  511.     char *xdefaults;    /* contents of defaults from server */
  512.     char *scratch_buffer;    /* place to hang scratch buffer */
  513.     unsigned long scratch_length;    /* length of scratch buffer */
  514.     int ext_number;        /* extension number on this display */
  515.     struct _XExten *ext_procs; /* extensions initialized on this display */
  516.     /*
  517.      * the following can be fixed size, as the protocol defines how
  518.      * much address space is available. 
  519.      * While this could be done using the extension vector, there
  520.      * may be MANY events processed, so a search through the extension
  521.      * list to find the right procedure for each event might be
  522.      * expensive if many extensions are being used.
  523.      */
  524.     Bool (*event_vec[128])();  /* vector for wire to event */
  525.     Status (*wire_vec[128])(); /* vector for event to wire */
  526.     KeySym lock_meaning;       /* for XLookupString */
  527.     struct _XKeytrans *key_bindings; /* for XLookupString */
  528.     Font cursor_font;       /* for XCreateFontCursor */
  529.     struct _XDisplayAtoms *atoms; /* for XInternAtom */
  530.     struct {           /* for XReconfigureWMWindow */
  531.         long sequence_number;
  532.         int (*old_handler)();
  533.         Bool succeeded;
  534.     } reconfigure_wm_window;
  535.     unsigned long flags;       /* internal connection flags */
  536.     unsigned int mode_switch;  /* keyboard group modifiers */
  537.     struct _XContextDB *context_db; /* context database */
  538.     Bool (**error_vec)();      /* vector for wire to error */
  539.     /*
  540.      * Xcms information
  541.      */
  542.     struct {
  543.        XPointer defaultCCCs;  /* pointer to an array of default XcmsCCC */
  544.        XPointer clientCmaps;  /* pointer to linked list of XcmsCmapRec */
  545.        XPointer perVisualIntensityMaps;
  546.                   /* linked list of XcmsIntensityMap */
  547.     } cms;
  548.     int conn_checker;         /* ugly thing used by _XEventsQueued */
  549.     struct _XIMFilter *im_filters;
  550. } Display;
  551.  
  552. #if NeedFunctionPrototypes    /* prototypes require event type definitions */
  553. #undef _XEVENT_
  554. #endif
  555. #ifndef _XEVENT_
  556. /*
  557.  * Definitions of specific events.
  558.  */
  559. typedef struct {
  560.     int type;        /* of event */
  561.     unsigned long serial;    /* # of last request processed by server */
  562.     Bool send_event;    /* true if this came from a SendEvent request */
  563.     Display *display;    /* Display the event was read from */
  564.     Window window;            /* "event" window it is reported relative to */
  565.     Window root;            /* root window that the event occured on */
  566.     Window subwindow;    /* child window */
  567.     Time time;        /* milliseconds */
  568.     int x, y;        /* pointer x, y coordinates in event window */
  569.     int x_root, y_root;    /* coordinates relative to root */
  570.     unsigned int state;    /* key or button mask */
  571.     unsigned int keycode;    /* detail */
  572.     Bool same_screen;    /* same screen flag */
  573. } XKeyEvent;
  574. typedef XKeyEvent XKeyPressedEvent;
  575. typedef XKeyEvent XKeyReleasedEvent;
  576.  
  577. typedef struct {
  578.     int type;        /* of event */
  579.     unsigned long serial;    /* # of last request processed by server */
  580.     Bool send_event;    /* true if this came from a SendEvent request */
  581.     Display *display;    /* Display the event was read from */
  582.     Window window;            /* "event" window it is reported relative to */
  583.     Window root;            /* root window that the event occured on */
  584.     Window subwindow;    /* child window */
  585.     Time time;        /* milliseconds */
  586.     int x, y;        /* pointer x, y coordinates in event window */
  587.     int x_root, y_root;    /* coordinates relative to root */
  588.     unsigned int state;    /* key or button mask */
  589.     unsigned int button;    /* detail */
  590.     Bool same_screen;    /* same screen flag */
  591. } XButtonEvent;
  592. typedef XButtonEvent XButtonPressedEvent;
  593. typedef XButtonEvent XButtonReleasedEvent;
  594.  
  595. typedef struct {
  596.     int type;        /* of event */
  597.     unsigned long serial;    /* # of last request processed by server */
  598.     Bool send_event;    /* true if this came from a SendEvent request */
  599.     Display *display;    /* Display the event was read from */
  600.     Window window;            /* "event" window reported relative to */
  601.     Window root;            /* root window that the event occured on */
  602.     Window subwindow;    /* child window */
  603.     Time time;        /* milliseconds */
  604.     int x, y;        /* pointer x, y coordinates in event window */
  605.     int x_root, y_root;    /* coordinates relative to root */
  606.     unsigned int state;    /* key or button mask */
  607.     char is_hint;        /* detail */
  608.     Bool same_screen;    /* same screen flag */
  609. } XMotionEvent;
  610. typedef XMotionEvent XPointerMovedEvent;
  611.  
  612. typedef struct {
  613.     int type;        /* of event */
  614.     unsigned long serial;    /* # of last request processed by server */
  615.     Bool send_event;    /* true if this came from a SendEvent request */
  616.     Display *display;    /* Display the event was read from */
  617.     Window window;            /* "event" window reported relative to */
  618.     Window root;            /* root window that the event occured on */
  619.     Window subwindow;    /* child window */
  620.     Time time;        /* milliseconds */
  621.     int x, y;        /* pointer x, y coordinates in event window */
  622.     int x_root, y_root;    /* coordinates relative to root */
  623.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  624.     int detail;
  625.     /*
  626.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  627.      * NotifyNonlinear,NotifyNonlinearVirtual
  628.      */
  629.     Bool same_screen;    /* same screen flag */
  630.     Bool focus;        /* boolean focus */
  631.     unsigned int state;    /* key or button mask */
  632. } XCrossingEvent;
  633. typedef XCrossingEvent XEnterWindowEvent;
  634. typedef XCrossingEvent XLeaveWindowEvent;
  635.  
  636. typedef struct {
  637.     int type;        /* FocusIn or FocusOut */
  638.     unsigned long serial;    /* # of last request processed by server */
  639.     Bool send_event;    /* true if this came from a SendEvent request */
  640.     Display *display;    /* Display the event was read from */
  641.     Window window;        /* window of event */
  642.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  643.     int detail;
  644.     /*
  645.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  646.      * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
  647.      * NotifyPointerRoot, NotifyDetailNone 
  648.      */
  649. } XFocusChangeEvent;
  650. typedef XFocusChangeEvent XFocusInEvent;
  651. typedef XFocusChangeEvent XFocusOutEvent;
  652.  
  653. /* generated on EnterWindow and FocusIn  when KeyMapState selected */
  654. typedef struct {
  655.     int type;
  656.     unsigned long serial;    /* # of last request processed by server */
  657.     Bool send_event;    /* true if this came from a SendEvent request */
  658.     Display *display;    /* Display the event was read from */
  659.     Window window;
  660.     char key_vector[32];
  661. } XKeymapEvent;    
  662.  
  663. typedef struct {
  664.     int type;
  665.     unsigned long serial;    /* # of last request processed by server */
  666.     Bool send_event;    /* true if this came from a SendEvent request */
  667.     Display *display;    /* Display the event was read from */
  668.     Window window;
  669.     int x, y;
  670.     int width, height;
  671.     int count;        /* if non-zero, at least this many more */
  672. } XExposeEvent;
  673.  
  674. typedef struct {
  675.     int type;
  676.     unsigned long serial;    /* # of last request processed by server */
  677.     Bool send_event;    /* true if this came from a SendEvent request */
  678.     Display *display;    /* Display the event was read from */
  679.     Drawable drawable;
  680.     int x, y;
  681.     int width, height;
  682.     int count;        /* if non-zero, at least this many more */
  683.     int major_code;        /* core is CopyArea or CopyPlane */
  684.     int minor_code;        /* not defined in the core */
  685. } XGraphicsExposeEvent;
  686.  
  687. typedef struct {
  688.     int type;
  689.     unsigned long serial;    /* # of last request processed by server */
  690.     Bool send_event;    /* true if this came from a SendEvent request */
  691.     Display *display;    /* Display the event was read from */
  692.     Drawable drawable;
  693.     int major_code;        /* core is CopyArea or CopyPlane */
  694.     int minor_code;        /* not defined in the core */
  695. } XNoExposeEvent;
  696.  
  697. typedef struct {
  698.     int type;
  699.     unsigned long serial;    /* # of last request processed by server */
  700.     Bool send_event;    /* true if this came from a SendEvent request */
  701.     Display *display;    /* Display the event was read from */
  702.     Window window;
  703.     int state;        /* Visibility state */
  704. } XVisibilityEvent;
  705.  
  706. typedef struct {
  707.     int type;
  708.     unsigned long serial;    /* # of last request processed by server */
  709.     Bool send_event;    /* true if this came from a SendEvent request */
  710.     Display *display;    /* Display the event was read from */
  711.     Window parent;        /* parent of the window */
  712.     Window window;        /* window id of window created */
  713.     int x, y;        /* window location */
  714.     int width, height;    /* size of window */
  715.     int border_width;    /* border width */
  716.     Bool override_redirect;    /* creation should be overridden */
  717. } XCreateWindowEvent;
  718.  
  719. typedef struct {
  720.     int type;
  721.     unsigned long serial;    /* # of last request processed by server */
  722.     Bool send_event;    /* true if this came from a SendEvent request */
  723.     Display *display;    /* Display the event was read from */
  724.     Window event;
  725.     Window window;
  726. } XDestroyWindowEvent;
  727.  
  728. typedef struct {
  729.     int type;
  730.     unsigned long serial;    /* # of last request processed by server */
  731.     Bool send_event;    /* true if this came from a SendEvent request */
  732.     Display *display;    /* Display the event was read from */
  733.     Window event;
  734.     Window window;
  735.     Bool from_configure;
  736. } XUnmapEvent;
  737.  
  738. typedef struct {
  739.     int type;
  740.     unsigned long serial;    /* # of last request processed by server */
  741.     Bool send_event;    /* true if this came from a SendEvent request */
  742.     Display *display;    /* Display the event was read from */
  743.     Window event;
  744.     Window window;
  745.     Bool override_redirect;    /* boolean, is override set... */
  746. } XMapEvent;
  747.  
  748. typedef struct {
  749.     int type;
  750.     unsigned long serial;    /* # of last request processed by server */
  751.     Bool send_event;    /* true if this came from a SendEvent request */
  752.     Display *display;    /* Display the event was read from */
  753.     Window parent;
  754.     Window window;
  755. } XMapRequestEvent;
  756.  
  757. typedef struct {
  758.     int type;
  759.     unsigned long serial;    /* # of last request processed by server */
  760.     Bool send_event;    /* true if this came from a SendEvent request */
  761.     Display *display;    /* Display the event was read from */
  762.     Window event;
  763.     Window window;
  764.     Window parent;
  765.     int x, y;
  766.     Bool override_redirect;
  767. } XReparentEvent;
  768.  
  769. typedef struct {
  770.     int type;
  771.     unsigned long serial;    /* # of last request processed by server */
  772.     Bool send_event;    /* true if this came from a SendEvent request */
  773.     Display *display;    /* Display the event was read from */
  774.     Window event;
  775.     Window window;
  776.     int x, y;
  777.     int width, height;
  778.     int border_width;
  779.     Window above;
  780.     Bool override_redirect;
  781. } XConfigureEvent;
  782.  
  783. typedef struct {
  784.     int type;
  785.     unsigned long serial;    /* # of last request processed by server */
  786.     Bool send_event;    /* true if this came from a SendEvent request */
  787.     Display *display;    /* Display the event was read from */
  788.     Window event;
  789.     Window window;
  790.     int x, y;
  791. } XGravityEvent;
  792.  
  793. typedef struct {
  794.     int type;
  795.     unsigned long serial;    /* # of last request processed by server */
  796.     Bool send_event;    /* true if this came from a SendEvent request */
  797.     Display *display;    /* Display the event was read from */
  798.     Window window;
  799.     int width, height;
  800. } XResizeRequestEvent;
  801.  
  802. typedef struct {
  803.     int type;
  804.     unsigned long serial;    /* # of last request processed by server */
  805.     Bool send_event;    /* true if this came from a SendEvent request */
  806.     Display *display;    /* Display the event was read from */
  807.     Window parent;
  808.     Window window;
  809.     int x, y;
  810.     int width, height;
  811.     int border_width;
  812.     Window above;
  813.     int detail;        /* Above, Below, TopIf, BottomIf, Opposite */
  814.     unsigned long value_mask;
  815. } XConfigureRequestEvent;
  816.  
  817. typedef struct {
  818.     int type;
  819.     unsigned long serial;    /* # of last request processed by server */
  820.     Bool send_event;    /* true if this came from a SendEvent request */
  821.     Display *display;    /* Display the event was read from */
  822.     Window event;
  823.     Window window;
  824.     int place;        /* PlaceOnTop, PlaceOnBottom */
  825. } XCirculateEvent;
  826.  
  827. typedef struct {
  828.     int type;
  829.     unsigned long serial;    /* # of last request processed by server */
  830.     Bool send_event;    /* true if this came from a SendEvent request */
  831.     Display *display;    /* Display the event was read from */
  832.     Window parent;
  833.     Window window;
  834.     int place;        /* PlaceOnTop, PlaceOnBottom */
  835. } XCirculateRequestEvent;
  836.  
  837. typedef struct {
  838.     int type;
  839.     unsigned long serial;    /* # of last request processed by server */
  840.     Bool send_event;    /* true if this came from a SendEvent request */
  841.     Display *display;    /* Display the event was read from */
  842.     Window window;
  843.     Atom atom;
  844.     Time time;
  845.     int state;        /* NewValue, Deleted */
  846. } XPropertyEvent;
  847.  
  848. typedef struct {
  849.     int type;
  850.     unsigned long serial;    /* # of last request processed by server */
  851.     Bool send_event;    /* true if this came from a SendEvent request */
  852.     Display *display;    /* Display the event was read from */
  853.     Window window;
  854.     Atom selection;
  855.     Time time;
  856. } XSelectionClearEvent;
  857.  
  858. typedef struct {
  859.     int type;
  860.     unsigned long serial;    /* # of last request processed by server */
  861.     Bool send_event;    /* true if this came from a SendEvent request */
  862.     Display *display;    /* Display the event was read from */
  863.     Window owner;
  864.     Window requestor;
  865.     Atom selection;
  866.     Atom target;
  867.     Atom property;
  868.     Time time;
  869. } XSelectionRequestEvent;
  870.  
  871. typedef struct {
  872.     int type;
  873.     unsigned long serial;    /* # of last request processed by server */
  874.     Bool send_event;    /* true if this came from a SendEvent request */
  875.     Display *display;    /* Display the event was read from */
  876.     Window requestor;
  877.     Atom selection;
  878.     Atom target;
  879.     Atom property;        /* ATOM or None */
  880.     Time time;
  881. } XSelectionEvent;
  882.  
  883. typedef struct {
  884.     int type;
  885.     unsigned long serial;    /* # of last request processed by server */
  886.     Bool send_event;    /* true if this came from a SendEvent request */
  887.     Display *display;    /* Display the event was read from */
  888.     Window window;
  889.     Colormap colormap;    /* COLORMAP or None */
  890. #if defined(__cplusplus) || defined(c_plusplus)
  891.     Bool c_new;        /* C++ */
  892. #else
  893.     Bool new;
  894. #endif
  895.     int state;        /* ColormapInstalled, ColormapUninstalled */
  896. } XColormapEvent;
  897.  
  898. typedef struct {
  899.     int type;
  900.     unsigned long serial;    /* # of last request processed by server */
  901.     Bool send_event;    /* true if this came from a SendEvent request */
  902.     Display *display;    /* Display the event was read from */
  903.     Window window;
  904.     Atom message_type;
  905.     int format;
  906.     union {
  907.         char b[20];
  908.         short s[10];
  909.         long l[5];
  910.         } data;
  911. } XClientMessageEvent;
  912.  
  913. typedef struct {
  914.     int type;
  915.     unsigned long serial;    /* # of last request processed by server */
  916.     Bool send_event;    /* true if this came from a SendEvent request */
  917.     Display *display;    /* Display the event was read from */
  918.     Window window;        /* unused */
  919.     int request;        /* one of MappingModifier, MappingKeyboard,
  920.                    MappingPointer */
  921.     int first_keycode;    /* first keycode */
  922.     int count;        /* defines range of change w. first_keycode*/
  923. } XMappingEvent;
  924.  
  925. typedef struct {
  926.     int type;
  927.     Display *display;    /* Display the event was read from */
  928.     XID resourceid;        /* resource id */
  929.     unsigned long serial;    /* serial number of failed request */
  930.     unsigned char error_code;    /* error code of failed request */
  931.     unsigned char request_code;    /* Major op-code of failed request */
  932.     unsigned char minor_code;    /* Minor op-code of failed request */
  933. } XErrorEvent;
  934.  
  935. typedef struct {
  936.     int type;
  937.     unsigned long serial;    /* # of last request processed by server */
  938.     Bool send_event;    /* true if this came from a SendEvent request */
  939.     Display *display;/* Display the event was read from */
  940.     Window window;    /* window on which event was requested in event mask */
  941. } XAnyEvent;
  942.  
  943. /*
  944.  * this union is defined so Xlib can always use the same sized
  945.  * event structure internally, to avoid memory fragmentation.
  946.  */
  947. typedef union _XEvent {
  948.         int type;        /* must not be changed; first element */
  949.     XAnyEvent xany;
  950.     XKeyEvent xkey;
  951.     XButtonEvent xbutton;
  952.     XMotionEvent xmotion;
  953.     XCrossingEvent xcrossing;
  954.     XFocusChangeEvent xfocus;
  955.     XExposeEvent xexpose;
  956.     XGraphicsExposeEvent xgraphicsexpose;
  957.     XNoExposeEvent xnoexpose;
  958.     XVisibilityEvent xvisibility;
  959.     XCreateWindowEvent xcreatewindow;
  960.     XDestroyWindowEvent xdestroywindow;
  961.     XUnmapEvent xunmap;
  962.     XMapEvent xmap;
  963.     XMapRequestEvent xmaprequest;
  964.     XReparentEvent xreparent;
  965.     XConfigureEvent xconfigure;
  966.     XGravityEvent xgravity;
  967.     XResizeRequestEvent xresizerequest;
  968.     XConfigureRequestEvent xconfigurerequest;
  969.     XCirculateEvent xcirculate;
  970.     XCirculateRequestEvent xcirculaterequest;
  971.     XPropertyEvent xproperty;
  972.     XSelectionClearEvent xselectionclear;
  973.     XSelectionRequestEvent xselectionrequest;
  974.     XSelectionEvent xselection;
  975.     XColormapEvent xcolormap;
  976.     XClientMessageEvent xclient;
  977.     XMappingEvent xmapping;
  978.     XErrorEvent xerror;
  979.     XKeymapEvent xkeymap;
  980.     long pad[24];
  981. } XEvent;
  982. #endif
  983.  
  984. #define XAllocID(dpy) ((*(dpy)->resource_alloc)((dpy)))
  985.  
  986. /*
  987.  * per character font metric information.
  988.  */
  989. typedef struct {
  990.     short    lbearing;    /* origin to left edge of raster */
  991.     short    rbearing;    /* origin to right edge of raster */
  992.     short    width;        /* advance to next char's origin */
  993.     short    ascent;        /* baseline to top edge of raster */
  994.     short    descent;    /* baseline to bottom edge of raster */
  995.     unsigned short attributes;    /* per char flags (not predefined) */
  996. } XCharStruct;
  997.  
  998. /*
  999.  * To allow arbitrary information with fonts, there are additional properties
  1000.  * returned.
  1001.  */
  1002. typedef struct {
  1003.     Atom name;
  1004.     unsigned long card32;
  1005. } XFontProp;
  1006.  
  1007. typedef struct {
  1008.     XExtData    *ext_data;    /* hook for extension to hang data */
  1009.     Font        fid;            /* Font id for this font */
  1010.     unsigned    direction;    /* hint about direction the font is painted */
  1011.     unsigned    min_char_or_byte2;/* first character */
  1012.     unsigned    max_char_or_byte2;/* last character */
  1013.     unsigned    min_byte1;    /* first row that exists */
  1014.     unsigned    max_byte1;    /* last row that exists */
  1015.     Bool    all_chars_exist;/* flag if all characters have non-zero size*/
  1016.     unsigned    default_char;    /* char to print for undefined character */
  1017.     int         n_properties;   /* how many properties there are */
  1018.     XFontProp    *properties;    /* pointer to array of additional properties*/
  1019.     XCharStruct    min_bounds;    /* minimum bounds over all existing char*/
  1020.     XCharStruct    max_bounds;    /* maximum bounds over all existing char*/
  1021.     XCharStruct    *per_char;    /* first_char to last_char information */
  1022.     int        ascent;        /* log. extent above baseline for spacing */
  1023.     int        descent;    /* log. descent below baseline for spacing */
  1024. } XFontStruct;
  1025.  
  1026. /*
  1027.  * PolyText routines take these as arguments.
  1028.  */
  1029. typedef struct {
  1030.     char *chars;        /* pointer to string */
  1031.     int nchars;            /* number of characters */
  1032.     int delta;            /* delta between strings */
  1033.     Font font;            /* font to print it in, None don't change */
  1034. } XTextItem;
  1035.  
  1036. typedef struct {        /* normal 16 bit characters are two bytes */
  1037.     unsigned char byte1;
  1038.     unsigned char byte2;
  1039. } XChar2b;
  1040.  
  1041. typedef struct {
  1042.     XChar2b *chars;        /* two byte characters */
  1043.     int nchars;            /* number of characters */
  1044.     int delta;            /* delta between strings */
  1045.     Font font;            /* font to print it in, None don't change */
  1046. } XTextItem16;
  1047.  
  1048.  
  1049. typedef union { Display *display;
  1050.         GC gc;
  1051.         Visual *visual;
  1052.         Screen *screen;
  1053.         ScreenFormat *pixmap_format;
  1054.         XFontStruct *font; } XEDataObject;
  1055.  
  1056. typedef struct {
  1057.     XRectangle      max_ink_extent;
  1058.     XRectangle      max_logical_extent;
  1059. } XFontSetExtents;
  1060.  
  1061. typedef struct _XFontSet *XFontSet;
  1062.  
  1063. typedef struct {
  1064.     char           *chars;
  1065.     int             nchars;
  1066.     int             delta;
  1067.     XFontSet        font_set;
  1068. } XmbTextItem;
  1069.  
  1070. typedef struct {
  1071.     wchar_t        *chars;
  1072.     int             nchars;
  1073.     int             delta;
  1074.     XFontSet        font_set;
  1075. } XwcTextItem;
  1076.  
  1077. typedef void (*XIMProc)();
  1078.  
  1079. typedef struct _XIM *XIM;
  1080. typedef struct _XIC *XIC;
  1081.  
  1082. typedef unsigned long XIMStyle;
  1083.  
  1084. typedef struct {
  1085.     unsigned short count_styles;
  1086.     XIMStyle *supported_styles;
  1087. } XIMStyles;
  1088.  
  1089. #define XIMPreeditArea        0x0001L
  1090. #define XIMPreeditCallbacks    0x0002L
  1091. #define XIMPreeditPosition    0x0004L
  1092. #define XIMPreeditNothing    0x0008L
  1093. #define XIMPreeditNone        0x0010L
  1094. #define XIMStatusArea        0x0100L
  1095. #define XIMStatusCallbacks    0x0200L
  1096. #define XIMStatusNothing    0x0400L
  1097. #define XIMStatusNone        0x0800L
  1098.  
  1099. #define XNVaNestedList "XNVaNestedList"
  1100. #define XNQueryInputStyle "queryInputStyle"
  1101. #define XNClientWindow "clientWindow"
  1102. #define XNInputStyle "inputStyle"
  1103. #define XNFocusWindow "focusWindow"
  1104. #define XNResourceName "resourceName"
  1105. #define XNResourceClass "resourceClass"
  1106. #define XNGeometryCallback "geometryCallback"
  1107. #define XNFilterEvents "filterEvents"
  1108. #define XNPreeditStartCallback "preeditStartCallback"
  1109. #define XNPreeditDoneCallback "preeditDoneCallback"
  1110. #define XNPreeditDrawCallback "preeditDrawCallback"
  1111. #define XNPreeditCaretCallback "preeditCaretCallback"
  1112. #define XNPreeditAttributes "preeditAttributes"
  1113. #define XNStatusStartCallback "statusStartCallback"
  1114. #define XNStatusDoneCallback "statusDoneCallback"
  1115. #define XNStatusDrawCallback "statusDrawCallback"
  1116. #define XNStatusAttributes "statusAttributes"
  1117. #define XNArea "area"
  1118. #define XNAreaNeeded "areaNeeded"
  1119. #define XNSpotLocation "spotLocation"
  1120. #define XNColormap "colorMap"
  1121. #define XNStdColormap "stdColorMap"
  1122. #define XNForeground "foreground"
  1123. #define XNBackground "background"
  1124. #define XNBackgroundPixmap "backgroundPixmap"
  1125. #define XNFontSet "fontSet"
  1126. #define XNLineSpace "lineSpace"
  1127. #define XNCursor "cursor"
  1128.  
  1129. #define XBufferOverflow        -1
  1130. #define XLookupNone        1
  1131. #define XLookupChars        2
  1132. #define XLookupKeySym        3
  1133. #define XLookupBoth        4
  1134.  
  1135. #if NeedFunctionPrototypes
  1136. typedef void *XVaNestedList;
  1137. #else
  1138. typedef XPointer XVaNestedList;
  1139. #endif
  1140.  
  1141. typedef struct {
  1142.     XPointer client_data;
  1143.     XIMProc callback;
  1144. } XIMCallback;
  1145.  
  1146. typedef unsigned long XIMFeedback;
  1147.  
  1148. #define XIMReverse    1
  1149. #define XIMUnderline    (1<<1) 
  1150. #define XIMHighlight    (1<<2)
  1151. #define XIMPrimary     (1<<5)
  1152. #define XIMSecondary    (1<<6)
  1153. #define XIMTertiary     (1<<7)
  1154.  
  1155. typedef struct _XIMText {
  1156.     unsigned short length;
  1157.     XIMFeedback *feedback;
  1158.     Bool encoding_is_wchar; 
  1159.     union {
  1160.     char *multi_byte;
  1161.     wchar_t *wide_char;
  1162.     } string; 
  1163. } XIMText;
  1164.  
  1165. typedef struct _XIMPreeditDrawCallbackStruct {
  1166.     int caret;        /* Cursor offset within pre-edit string */
  1167.     int chg_first;    /* Starting change position */
  1168.     int chg_length;    /* Length of the change in character count */
  1169.     XIMText *text;
  1170. } XIMPreeditDrawCallbackStruct;
  1171.  
  1172. typedef enum {
  1173.     XIMForwardChar, XIMBackwardChar,
  1174.     XIMForwardWord, XIMBackwardWord,
  1175.     XIMCaretUp, XIMCaretDown,
  1176.     XIMNextLine, XIMPreviousLine,
  1177.     XIMLineStart, XIMLineEnd, 
  1178.     XIMAbsolutePosition,
  1179.     XIMDontChange
  1180. } XIMCaretDirection;
  1181.  
  1182. typedef enum {
  1183.     XIMIsInvisible,    /* Disable caret feedback */ 
  1184.     XIMIsPrimary,    /* UI defined caret feedback */
  1185.     XIMIsSecondary    /* UI defined caret feedback */
  1186. } XIMCaretStyle;
  1187.  
  1188. typedef struct _XIMPreeditCaretCallbackStruct {
  1189.     int position;         /* Caret offset within pre-edit string */
  1190.     XIMCaretDirection direction; /* Caret moves direction */
  1191.     XIMCaretStyle style;     /* Feedback of the caret */
  1192. } XIMPreeditCaretCallbackStruct;
  1193.  
  1194. typedef enum {
  1195.     XIMTextType,
  1196.     XIMBitmapType
  1197. } XIMStatusDataType;
  1198.     
  1199. typedef struct _XIMStatusDrawCallbackStruct {
  1200.     XIMStatusDataType type;
  1201.     union {
  1202.     XIMText *text;
  1203.     Pixmap  bitmap;
  1204.     } data;
  1205. } XIMStatusDrawCallbackStruct;
  1206.  
  1207. _XFUNCPROTOBEGIN
  1208.  
  1209. #ifndef MAKELIBRARY
  1210.  
  1211. extern XFontStruct *XLoadQueryFont(
  1212. #if NeedFunctionPrototypes
  1213.     Display*        /* display */,
  1214.     char*    /* name */
  1215. #endif
  1216. );
  1217.  
  1218. extern XFontStruct *XQueryFont(
  1219. #if NeedFunctionPrototypes
  1220.     Display*        /* display */,
  1221.     XID            /* font_ID */
  1222. #endif
  1223. );
  1224.  
  1225.  
  1226. extern XTimeCoord *XGetMotionEvents(
  1227. #if NeedFunctionPrototypes
  1228.     Display*        /* display */,
  1229.     Window        /* w */,
  1230.     Time        /* start */,
  1231.     Time        /* stop */,
  1232.     int*        /* nevents_return */
  1233. #endif
  1234. );
  1235.  
  1236. extern XModifierKeymap *XDeleteModifiermapEntry(
  1237. #if NeedFunctionPrototypes
  1238.     XModifierKeymap*    /* modmap */,
  1239. #if NeedWidePrototypes
  1240.     unsigned int    /* keycode_entry */,
  1241. #else
  1242.     KeyCode        /* keycode_entry */,
  1243. #endif
  1244.     int            /* modifier */
  1245. #endif
  1246. );
  1247.  
  1248. extern XModifierKeymap    *XGetModifierMapping(
  1249. #if NeedFunctionPrototypes
  1250.     Display*        /* display */
  1251. #endif
  1252. );
  1253.  
  1254. extern XModifierKeymap    *XInsertModifiermapEntry(
  1255. #if NeedFunctionPrototypes
  1256.     XModifierKeymap*    /* modmap */,
  1257. #if NeedWidePrototypes
  1258.     unsigned int    /* keycode_entry */,
  1259. #else
  1260.     KeyCode        /* keycode_entry */,
  1261. #endif
  1262.     int            /* modifier */    
  1263. #endif
  1264. );
  1265.  
  1266. extern XModifierKeymap *XNewModifiermap(
  1267. #if NeedFunctionPrototypes
  1268.     int            /* max_keys_per_mod */
  1269. #endif
  1270. );
  1271.  
  1272. extern XImage *XCreateImage(
  1273. #if NeedFunctionPrototypes
  1274.     Display*        /* display */,
  1275.     Visual*        /* visual */,
  1276.     unsigned int    /* depth */,
  1277.     int            /* format */,
  1278.     int            /* offset */,
  1279.     char*        /* data */,
  1280.     unsigned int    /* width */,
  1281.     unsigned int    /* height */,
  1282.     int            /* bitmap_pad */,
  1283.     int            /* bytes_per_line */
  1284. #endif
  1285. );
  1286. extern XImage *XGetImage(
  1287. #if NeedFunctionPrototypes
  1288.     Display*        /* display */,
  1289.     Drawable        /* d */,
  1290.     int            /* x */,
  1291.     int            /* y */,
  1292.     unsigned int    /* width */,
  1293.     unsigned int    /* height */,
  1294.     unsigned long    /* plane_mask */,
  1295.     int            /* format */
  1296. #endif
  1297. );
  1298. extern XImage *XGetSubImage(
  1299. #if NeedFunctionPrototypes
  1300.     Display*        /* display */,
  1301.     Drawable        /* d */,
  1302.     int            /* x */,
  1303.     int            /* y */,
  1304.     unsigned int    /* width */,
  1305.     unsigned int    /* height */,
  1306.     unsigned long    /* plane_mask */,
  1307.     int            /* format */,
  1308.     XImage*        /* dest_image */,
  1309.     int            /* dest_x */,
  1310.     int            /* dest_y */
  1311. #endif
  1312. );
  1313.  
  1314. /* 
  1315.  * X function declarations.
  1316.  */
  1317. extern Display *XOpenDisplay(
  1318. #if NeedFunctionPrototypes
  1319.     char*    /* display_name */
  1320. #endif
  1321. );
  1322.  
  1323. extern void XrmInitialize(
  1324. #if NeedFunctionPrototypes
  1325.     void
  1326. #endif
  1327. );
  1328.  
  1329. extern char *XFetchBytes(
  1330. #if NeedFunctionPrototypes
  1331.     Display*        /* display */,
  1332.     int*        /* nbytes_return */
  1333. #endif
  1334. );
  1335. extern char *XFetchBuffer(
  1336. #if NeedFunctionPrototypes
  1337.     Display*        /* display */,
  1338.     int*        /* nbytes_return */,
  1339.     int            /* buffer */
  1340. #endif
  1341. );
  1342. extern char *XGetAtomName(
  1343. #if NeedFunctionPrototypes
  1344.     Display*        /* display */,
  1345.     Atom        /* atom */
  1346. #endif
  1347. );
  1348. extern char *XGetDefault(
  1349. #if NeedFunctionPrototypes
  1350.     Display*        /* display */,
  1351.      char*    /* program */,
  1352.      char*    /* option */          
  1353. #endif
  1354. );
  1355. extern char *XDisplayName(
  1356. #if NeedFunctionPrototypes
  1357.      char*    /* string */
  1358. #endif
  1359. );
  1360. extern char *XKeysymToString(
  1361. #if NeedFunctionPrototypes
  1362.     KeySym        /* keysym */
  1363. #endif
  1364. );
  1365.  
  1366. extern int (*XSynchronize(
  1367. #if NeedFunctionPrototypes
  1368.     Display*        /* display */,
  1369.     Bool        /* onoff */
  1370. #endif
  1371. ))();
  1372. extern int (*XSetAfterFunction(
  1373. #if NeedFunctionPrototypes
  1374.     Display*        /* display */,
  1375.     int (*) (
  1376. #if NeedNestedPrototypes
  1377.          Display*    /* display */
  1378. #endif
  1379.             )        /* procedure */
  1380. #endif
  1381. ))();
  1382. extern Atom XInternAtom(
  1383. #if NeedFunctionPrototypes
  1384.     Display*        /* display */,
  1385.      char*    /* atom_name */,
  1386.     Bool        /* only_if_exists */         
  1387. #endif
  1388. );
  1389. extern Colormap XCopyColormapAndFree(
  1390. #if NeedFunctionPrototypes
  1391.     Display*        /* display */,
  1392.     Colormap        /* colormap */
  1393. #endif
  1394. );
  1395. extern Colormap XCreateColormap(
  1396. #if NeedFunctionPrototypes
  1397.     Display*        /* display */,
  1398.     Window        /* w */,
  1399.     Visual*        /* visual */,
  1400.     int            /* alloc */             
  1401. #endif
  1402. );
  1403. extern Cursor XCreatePixmapCursor(
  1404. #if NeedFunctionPrototypes
  1405.     Display*        /* display */,
  1406.     Pixmap        /* source */,
  1407.     Pixmap        /* mask */,
  1408.     XColor*        /* foreground_color */,
  1409.     XColor*        /* background_color */,
  1410.     unsigned int    /* x */,
  1411.     unsigned int    /* y */               
  1412. #endif
  1413. );
  1414. extern Cursor XCreateGlyphCursor(
  1415. #if NeedFunctionPrototypes
  1416.     Display*        /* display */,
  1417.     Font        /* source_font */,
  1418.     Font        /* mask_font */,
  1419.     unsigned int    /* source_char */,
  1420.     unsigned int    /* mask_char */,
  1421.     XColor*        /* foreground_color */,
  1422.     XColor*        /* background_color */
  1423. #endif
  1424. );
  1425. extern Cursor XCreateFontCursor(
  1426. #if NeedFunctionPrototypes
  1427.     Display*        /* display */,
  1428.     unsigned int    /* shape */
  1429. #endif
  1430. );
  1431. extern Font XLoadFont(
  1432. #if NeedFunctionPrototypes
  1433.     Display*        /* display */,
  1434.     char*    /* name */
  1435. #endif
  1436. );
  1437. extern GC XCreateGC(
  1438. #if NeedFunctionPrototypes
  1439.     Display*        /* display */,
  1440.     Drawable        /* d */,
  1441.     unsigned long    /* valuemask */,
  1442.     XGCValues*        /* values */
  1443. #endif
  1444. );
  1445. extern GContext XGContextFromGC(
  1446. #if NeedFunctionPrototypes
  1447.     GC            /* gc */
  1448. #endif
  1449. );
  1450. extern void XFlushGC(
  1451. #if NeedFunctionPrototypes
  1452.     Display*        /* display */,
  1453.     GC            /* gc */
  1454. #endif
  1455. );
  1456. extern Pixmap XCreatePixmap(
  1457. #if NeedFunctionPrototypes
  1458.     Display*        /* display */,
  1459.     Drawable        /* d */,
  1460.     unsigned int    /* width */,
  1461.     unsigned int    /* height */,
  1462.     unsigned int    /* depth */                
  1463. #endif
  1464. );
  1465. extern Pixmap XCreateBitmapFromData(
  1466. #if NeedFunctionPrototypes
  1467.     Display*        /* display */,
  1468.     Drawable        /* d */,
  1469.     char*    /* data */,
  1470.     unsigned int    /* width */,
  1471.     unsigned int    /* height */
  1472. #endif
  1473. );
  1474. extern Pixmap XCreatePixmapFromBitmapData(
  1475. #if NeedFunctionPrototypes
  1476.     Display*        /* display */,
  1477.     Drawable        /* d */,
  1478.     char*        /* data */,
  1479.     unsigned int    /* width */,
  1480.     unsigned int    /* height */,
  1481.     unsigned long    /* fg */,
  1482.     unsigned long    /* bg */,
  1483.     unsigned int    /* depth */
  1484. #endif
  1485. );
  1486. extern Window XCreateSimpleWindow(
  1487. #if NeedFunctionPrototypes
  1488.     Display*        /* display */,
  1489.     Window        /* parent */,
  1490.     int            /* x */,
  1491.     int            /* y */,
  1492.     unsigned int    /* width */,
  1493.     unsigned int    /* height */,
  1494.     unsigned int    /* border_width */,
  1495.     unsigned long    /* border */,
  1496.     unsigned long    /* background */
  1497. #endif
  1498. );
  1499. extern Window XGetSelectionOwner(
  1500. #if NeedFunctionPrototypes
  1501.     Display*        /* display */,
  1502.     Atom        /* selection */
  1503. #endif
  1504. );
  1505. extern Window XCreateWindow(
  1506. #if NeedFunctionPrototypes
  1507.     Display*        /* display */,
  1508.     Window        /* parent */,
  1509.     int            /* x */,
  1510.     int            /* y */,
  1511.     unsigned int    /* width */,
  1512.     unsigned int    /* height */,
  1513.     unsigned int    /* border_width */,
  1514.     int            /* depth */,
  1515.     unsigned int    /* class */,
  1516.     Visual*        /* visual */,
  1517.     unsigned long    /* valuemask */,
  1518.     XSetWindowAttributes*    /* attributes */
  1519. #endif
  1520. ); 
  1521. extern Colormap *XListInstalledColormaps(
  1522. #if NeedFunctionPrototypes
  1523.     Display*        /* display */,
  1524.     Window        /* w */,
  1525.     int*        /* num_return */
  1526. #endif
  1527. );
  1528. extern char **XListFonts(
  1529. #if NeedFunctionPrototypes
  1530.     Display*        /* display */,
  1531.      char*    /* pattern */,
  1532.     int            /* maxnames */,
  1533.     int*        /* actual_count_return */
  1534. #endif
  1535. );
  1536. extern char **XListFontsWithInfo(
  1537. #if NeedFunctionPrototypes
  1538.     Display*        /* display */,
  1539.      char*    /* pattern */,
  1540.     int            /* maxnames */,
  1541.     int*        /* count_return */,
  1542.     XFontStruct**    /* info_return */
  1543. #endif
  1544. );
  1545. extern char **XGetFontPath(
  1546. #if NeedFunctionPrototypes
  1547.     Display*        /* display */,
  1548.     int*        /* npaths_return */
  1549. #endif
  1550. );
  1551. extern char **XListExtensions(
  1552. #if NeedFunctionPrototypes
  1553.     Display*        /* display */,
  1554.     int*        /* nextensions_return */
  1555. #endif
  1556. );
  1557. extern Atom *XListProperties(
  1558. #if NeedFunctionPrototypes
  1559.     Display*        /* display */,
  1560.     Window        /* w */,
  1561.     int*        /* num_prop_return */
  1562. #endif
  1563. );
  1564. extern XHostAddress *XListHosts(
  1565. #if NeedFunctionPrototypes
  1566.     Display*        /* display */,
  1567.     int*        /* nhosts_return */,
  1568.     Bool*        /* state_return */
  1569. #endif
  1570. );
  1571. extern KeySym XKeycodeToKeysym(
  1572. #if NeedFunctionPrototypes
  1573.     Display*        /* display */,
  1574. #if NeedWidePrototypes
  1575.     unsigned int    /* keycode */,
  1576. #else
  1577.     KeyCode        /* keycode */,
  1578. #endif
  1579.     int            /* index */
  1580. #endif
  1581. );
  1582. extern KeySym XLookupKeysym(
  1583. #if NeedFunctionPrototypes
  1584.     XKeyEvent*        /* key_event */,
  1585.     int            /* index */
  1586. #endif
  1587. );
  1588. extern KeySym *XGetKeyboardMapping(
  1589. #if NeedFunctionPrototypes
  1590.     Display*        /* display */,
  1591. #if NeedWidePrototypes
  1592.     unsigned int    /* first_keycode */,
  1593. #else
  1594.     KeyCode        /* first_keycode */,
  1595. #endif
  1596.     int            /* keycode_count */,
  1597.     int*        /* keysyms_per_keycode_return */
  1598. #endif
  1599. );
  1600. extern KeySym XStringToKeysym(
  1601. #if NeedFunctionPrototypes
  1602.      char*    /* string */
  1603. #endif
  1604. );
  1605. extern long XMaxRequestSize(
  1606. #if NeedFunctionPrototypes
  1607.     Display*        /* display */
  1608. #endif
  1609. );
  1610. extern char *XResourceManagerString(
  1611. #if NeedFunctionPrototypes
  1612.     Display*        /* display */
  1613. #endif
  1614. );
  1615. extern char *XScreenResourceString(
  1616. #if NeedFunctionPrototypes
  1617.     Screen*        /* screen */
  1618. #endif
  1619. );
  1620. extern unsigned long XDisplayMotionBufferSize(
  1621. #if NeedFunctionPrototypes
  1622.     Display*        /* display */
  1623. #endif
  1624. );
  1625. extern VisualID XVisualIDFromVisual(
  1626. #if NeedFunctionPrototypes
  1627.     Visual*        /* visual */
  1628. #endif
  1629. );
  1630.  
  1631. /* routines for dealing with extensions */
  1632.  
  1633. extern XExtCodes *XInitExtension(
  1634. #if NeedFunctionPrototypes
  1635.     Display*        /* display */,
  1636.      char*    /* name */
  1637. #endif
  1638. );
  1639.  
  1640. extern XExtCodes *XAddExtension(
  1641. #if NeedFunctionPrototypes
  1642.     Display*        /* display */
  1643. #endif
  1644. );
  1645. extern XExtData *XFindOnExtensionList(
  1646. #if NeedFunctionPrototypes
  1647.     XExtData**        /* structure */,
  1648.     int            /* number */
  1649. #endif
  1650. );
  1651. extern XExtData **XEHeadOfExtensionList(
  1652. #if NeedFunctionPrototypes
  1653.     XEDataObject    /* object */
  1654. #endif
  1655. );
  1656.  
  1657. /* these are routines for which there are also macros */
  1658. extern Window XRootWindow(
  1659. #if NeedFunctionPrototypes
  1660.     Display*        /* display */,
  1661.     int            /* screen_number */
  1662. #endif
  1663. );
  1664. extern Window XDefaultRootWindow(
  1665. #if NeedFunctionPrototypes
  1666.     Display*        /* display */
  1667. #endif
  1668. );
  1669. extern Window XRootWindowOfScreen(
  1670. #if NeedFunctionPrototypes
  1671.     Screen*        /* screen */
  1672. #endif
  1673. );
  1674. extern Visual *XDefaultVisual(
  1675. #if NeedFunctionPrototypes
  1676.     Display*        /* display */,
  1677.     int            /* screen_number */
  1678. #endif
  1679. );
  1680. extern Visual *XDefaultVisualOfScreen(
  1681. #if NeedFunctionPrototypes
  1682.     Screen*        /* screen */
  1683. #endif
  1684. );
  1685. extern GC XDefaultGC(
  1686. #if NeedFunctionPrototypes
  1687.     Display*        /* display */,
  1688.     int            /* screen_number */
  1689. #endif
  1690. );
  1691. extern GC XDefaultGCOfScreen(
  1692. #if NeedFunctionPrototypes
  1693.     Screen*        /* screen */
  1694. #endif
  1695. );
  1696. extern unsigned long XBlackPixel(
  1697. #if NeedFunctionPrototypes
  1698.     Display*        /* display */,
  1699.     int            /* screen_number */
  1700. #endif
  1701. );
  1702. extern unsigned long XWhitePixel(
  1703. #if NeedFunctionPrototypes
  1704.     Display*        /* display */,
  1705.     int            /* screen_number */
  1706. #endif
  1707. );
  1708. extern unsigned long XAllPlanes(
  1709. #if NeedFunctionPrototypes
  1710.     void
  1711. #endif
  1712. );
  1713. extern unsigned long XBlackPixelOfScreen(
  1714. #if NeedFunctionPrototypes
  1715.     Screen*        /* screen */
  1716. #endif
  1717. );
  1718. extern unsigned long XWhitePixelOfScreen(
  1719. #if NeedFunctionPrototypes
  1720.     Screen*        /* screen */
  1721. #endif
  1722. );
  1723. extern unsigned long XNextRequest(
  1724. #if NeedFunctionPrototypes
  1725.     Display*        /* display */
  1726. #endif
  1727. );
  1728. extern unsigned long XLastKnownRequestProcessed(
  1729. #if NeedFunctionPrototypes
  1730.     Display*        /* display */
  1731. #endif
  1732. );
  1733. extern char *XServerVendor(
  1734. #if NeedFunctionPrototypes
  1735.     Display*        /* display */
  1736. #endif
  1737. );
  1738. extern char *XDisplayString(
  1739. #if NeedFunctionPrototypes
  1740.     Display*        /* display */
  1741. #endif
  1742. );
  1743. extern Colormap XDefaultColormap(
  1744. #if NeedFunctionPrototypes
  1745.     Display*        /* display */,
  1746.     int            /* screen_number */
  1747. #endif
  1748. );
  1749. extern Colormap XDefaultColormapOfScreen(
  1750. #if NeedFunctionPrototypes
  1751.     Screen*        /* screen */
  1752. #endif
  1753. );
  1754. extern Display *XDisplayOfScreen(
  1755. #if NeedFunctionPrototypes
  1756.     Screen*        /* screen */
  1757. #endif
  1758. );
  1759. extern Screen *XScreenOfDisplay(
  1760. #if NeedFunctionPrototypes
  1761.     Display*        /* display */,
  1762.     int            /* screen_number */
  1763. #endif
  1764. );
  1765. extern Screen *XDefaultScreenOfDisplay(
  1766. #if NeedFunctionPrototypes
  1767.     Display*        /* display */
  1768. #endif
  1769. );
  1770. extern long XEventMaskOfScreen(
  1771. #if NeedFunctionPrototypes
  1772.     Screen*        /* screen */
  1773. #endif
  1774. );
  1775.  
  1776. extern int XScreenNumberOfScreen(
  1777. #if NeedFunctionPrototypes
  1778.     Screen*        /* screen */
  1779. #endif
  1780. );
  1781.  
  1782. typedef int (*XErrorHandler) (        /* WARNING, this type not in Xlib spec */
  1783. #if NeedFunctionPrototypes
  1784.     Display*        /* display */,
  1785.     XErrorEvent*    /* error_event */
  1786. #endif
  1787. );
  1788.  
  1789. extern XErrorHandler XSetErrorHandler (
  1790. #if NeedFunctionPrototypes
  1791.     XErrorHandler    /* handler */
  1792. #endif
  1793. );
  1794.  
  1795.  
  1796. typedef int (*XIOErrorHandler) (    /* WARNING, this type not in Xlib spec */
  1797. #if NeedFunctionPrototypes
  1798.     Display*        /* display */
  1799. #endif
  1800. );
  1801.  
  1802. extern XIOErrorHandler XSetIOErrorHandler (
  1803. #if NeedFunctionPrototypes
  1804.     XIOErrorHandler    /* handler */
  1805. #endif
  1806. );
  1807.  
  1808.  
  1809. extern XPixmapFormatValues *XListPixmapFormats(
  1810. #if NeedFunctionPrototypes
  1811.     Display*        /* display */,
  1812.     int*        /* count_return */
  1813. #endif
  1814. );
  1815. extern int *XListDepths(
  1816. #if NeedFunctionPrototypes
  1817.     Display*        /* display */,
  1818.     int            /* screen_number */,
  1819.     int*        /* count_return */
  1820. #endif
  1821. );
  1822.  
  1823. /* ICCCM routines for things that don't require special include files; */
  1824. /* other declarations are given in Xutil.h                             */
  1825. extern Status XReconfigureWMWindow(
  1826. #if NeedFunctionPrototypes
  1827.     Display*        /* display */,
  1828.     Window        /* w */,
  1829.     int            /* screen_number */,
  1830.     unsigned int    /* mask */,
  1831.     XWindowChanges*    /* changes */
  1832. #endif
  1833. );
  1834.  
  1835. extern Status XGetWMProtocols(
  1836. #if NeedFunctionPrototypes
  1837.     Display*        /* display */,
  1838.     Window        /* w */,
  1839.     Atom**        /* protocols_return */,
  1840.     int*        /* count_return */
  1841. #endif
  1842. );
  1843. extern Status XSetWMProtocols(
  1844. #if NeedFunctionPrototypes
  1845.     Display*        /* display */,
  1846.     Window        /* w */,
  1847.     Atom*        /* protocols */,
  1848.     int            /* count */
  1849. #endif
  1850. );
  1851. extern Status XIconifyWindow(
  1852. #if NeedFunctionPrototypes
  1853.     Display*        /* display */,
  1854.     Window        /* w */,
  1855.     int            /* screen_number */
  1856. #endif
  1857. );
  1858. extern Status XWithdrawWindow(
  1859. #if NeedFunctionPrototypes
  1860.     Display*        /* display */,
  1861.     Window        /* w */,
  1862.     int            /* screen_number */
  1863. #endif
  1864. );
  1865. extern Status XGetCommand(
  1866. #if NeedFunctionPrototypes
  1867.     Display*        /* display */,
  1868.     Window        /* w */,
  1869.     char***        /* argv_return */,
  1870.     int*        /* argc_return */
  1871. #endif
  1872. );
  1873. extern Status XGetWMColormapWindows(
  1874. #if NeedFunctionPrototypes
  1875.     Display*        /* display */,
  1876.     Window        /* w */,
  1877.     Window**        /* windows_return */,
  1878.     int*        /* count_return */
  1879. #endif
  1880. );
  1881. extern Status XSetWMColormapWindows(
  1882. #if NeedFunctionPrototypes
  1883.     Display*        /* display */,
  1884.     Window        /* w */,
  1885.     Window*        /* colormap_windows */,
  1886.     int            /* count */
  1887. #endif
  1888. );
  1889. extern void XFreeStringList(
  1890. #if NeedFunctionPrototypes
  1891.     char**        /* list */
  1892. #endif
  1893. );
  1894. extern XSetTransientForHint(
  1895. #if NeedFunctionPrototypes
  1896.     Display*        /* display */,
  1897.     Window        /* w */,
  1898.     Window        /* prop_window */
  1899. #endif
  1900. );
  1901.  
  1902. /* The following are given in alphabetical order */
  1903.  
  1904. extern XActivateScreenSaver(
  1905. #if NeedFunctionPrototypes
  1906.     Display*        /* display */
  1907. #endif
  1908. );
  1909.  
  1910. extern XAddHost(
  1911. #if NeedFunctionPrototypes
  1912.     Display*        /* display */,
  1913.     XHostAddress*    /* host */
  1914. #endif
  1915. );
  1916.  
  1917. extern XAddHosts(
  1918. #if NeedFunctionPrototypes
  1919.     Display*        /* display */,
  1920.     XHostAddress*    /* hosts */,
  1921.     int            /* num_hosts */    
  1922. #endif
  1923. );
  1924.  
  1925. extern XAddToExtensionList(
  1926. #if NeedFunctionPrototypes
  1927.     struct _XExtData**    /* structure */,
  1928.     XExtData*        /* ext_data */
  1929. #endif
  1930. );
  1931.  
  1932. extern XAddToSaveSet(
  1933. #if NeedFunctionPrototypes
  1934.     Display*        /* display */,
  1935.     Window        /* w */
  1936. #endif
  1937. );
  1938.  
  1939. extern Status XAllocColor(
  1940. #if NeedFunctionPrototypes
  1941.     Display*        /* display */,
  1942.     Colormap        /* colormap */,
  1943.     XColor*        /* screen_in_out */
  1944. #endif
  1945. );
  1946.  
  1947. extern Status XAllocColorCells(
  1948. #if NeedFunctionPrototypes
  1949.     Display*        /* display */,
  1950.     Colormap        /* colormap */,
  1951.     Bool            /* contig */,
  1952.     unsigned long*    /* plane_masks_return */,
  1953.     unsigned int    /* nplanes */,
  1954.     unsigned long*    /* pixels_return */,
  1955.     unsigned int     /* npixels */
  1956. #endif
  1957. );
  1958.  
  1959. extern Status XAllocColorPlanes(
  1960. #if NeedFunctionPrototypes
  1961.     Display*        /* display */,
  1962.     Colormap        /* colormap */,
  1963.     Bool        /* contig */,
  1964.     unsigned long*    /* pixels_return */,
  1965.     int            /* ncolors */,
  1966.     int            /* nreds */,
  1967.     int            /* ngreens */,
  1968.     int            /* nblues */,
  1969.     unsigned long*    /* rmask_return */,
  1970.     unsigned long*    /* gmask_return */,
  1971.     unsigned long*    /* bmask_return */
  1972. #endif
  1973. );
  1974.  
  1975. extern Status XAllocNamedColor(
  1976. #if NeedFunctionPrototypes
  1977.     Display*        /* display */,
  1978.     Colormap        /* colormap */,
  1979.     char*    /* color_name */,
  1980.     XColor*        /* screen_def_return */,
  1981.     XColor*        /* exact_def_return */
  1982. #endif
  1983. );
  1984.  
  1985. extern XAllowEvents(
  1986. #if NeedFunctionPrototypes
  1987.     Display*        /* display */,
  1988.     int            /* event_mode */,
  1989.     Time        /* time */
  1990. #endif
  1991. );
  1992.  
  1993. extern XAutoRepeatOff(
  1994. #if NeedFunctionPrototypes
  1995.     Display*        /* display */
  1996. #endif
  1997. );
  1998.  
  1999. extern XAutoRepeatOn(
  2000. #if NeedFunctionPrototypes
  2001.     Display*        /* display */
  2002. #endif
  2003. );
  2004.  
  2005. extern XBell(
  2006. #if NeedFunctionPrototypes
  2007.     Display*        /* display */,
  2008.     int            /* percent */
  2009. #endif
  2010. );
  2011.  
  2012. extern int XBitmapBitOrder(
  2013. #if NeedFunctionPrototypes
  2014.     Display*        /* display */
  2015. #endif
  2016. );
  2017.  
  2018. extern int XBitmapPad(
  2019. #if NeedFunctionPrototypes
  2020.     Display*        /* display */
  2021. #endif
  2022. );
  2023.  
  2024. extern int XBitmapUnit(
  2025. #if NeedFunctionPrototypes
  2026.     Display*        /* display */
  2027. #endif
  2028. );
  2029.  
  2030. extern int XCellsOfScreen(
  2031. #if NeedFunctionPrototypes
  2032.     Screen*        /* screen */
  2033. #endif
  2034. );
  2035.  
  2036. extern XChangeActivePointerGrab(
  2037. #if NeedFunctionPrototypes
  2038.     Display*        /* display */,
  2039.     unsigned int    /* event_mask */,
  2040.     Cursor        /* cursor */,
  2041.     Time        /* time */
  2042. #endif
  2043. );
  2044.  
  2045. extern XChangeGC(
  2046. #if NeedFunctionPrototypes
  2047.     Display*        /* display */,
  2048.     GC            /* gc */,
  2049.     unsigned long    /* valuemask */,
  2050.     XGCValues*        /* values */
  2051. #endif
  2052. );
  2053.  
  2054. extern XChangeKeyboardControl(
  2055. #if NeedFunctionPrototypes
  2056.     Display*        /* display */,
  2057.     unsigned long    /* value_mask */,
  2058.     XKeyboardControl*    /* values */
  2059. #endif
  2060. );
  2061.  
  2062. extern XChangeKeyboardMapping(
  2063. #if NeedFunctionPrototypes
  2064.     Display*        /* display */,
  2065.     int            /* first_keycode */,
  2066.     int            /* keysyms_per_keycode */,
  2067.     KeySym*        /* keysyms */,
  2068.     int            /* num_codes */
  2069. #endif
  2070. );
  2071.  
  2072. extern XChangePointerControl(
  2073. #if NeedFunctionPrototypes
  2074.     Display*        /* display */,
  2075.     Bool        /* do_accel */,
  2076.     Bool        /* do_threshold */,
  2077.     int            /* accel_numerator */,
  2078.     int            /* accel_denominator */,
  2079.     int            /* threshold */
  2080. #endif
  2081. );
  2082.  
  2083. extern XChangeProperty(
  2084. #if NeedFunctionPrototypes
  2085.     Display*        /* display */,
  2086.     Window        /* w */,
  2087.     Atom        /* property */,
  2088.     Atom        /* type */,
  2089.     int            /* format */,
  2090.     int            /* mode */,
  2091.      unsigned char*    /* data */,
  2092.     int            /* nelements */
  2093. #endif
  2094. );
  2095.  
  2096. extern XChangeSaveSet(
  2097. #if NeedFunctionPrototypes
  2098.     Display*        /* display */,
  2099.     Window        /* w */,
  2100.     int            /* change_mode */
  2101. #endif
  2102. );
  2103.  
  2104. extern XChangeWindowAttributes(
  2105. #if NeedFunctionPrototypes
  2106.     Display*        /* display */,
  2107.     Window        /* w */,
  2108.     unsigned long    /* valuemask */,
  2109.     XSetWindowAttributes* /* attributes */
  2110. #endif
  2111. );
  2112.  
  2113. extern Bool XCheckIfEvent(Display* display,
  2114.           XEvent* event_return,
  2115.           Bool (*
  2116. #if 1
  2117. __stdargs
  2118. #endif
  2119. predicate)(Display *,XEvent*,char *data),
  2120.           char* arg );
  2121.  
  2122. /*
  2123. extern Bool XCheckIfEvent(
  2124. #if NeedFunctionPrototypes
  2125.     Display*        /* display */,
  2126.     XEvent*        /* event_return */,
  2127.     Bool (*) (
  2128. #if NeedNestedPrototypes
  2129.            Display*            /* display */,
  2130.                XEvent*            /* event */,
  2131.                XPointer            /* arg */
  2132. #endif
  2133.              )        /* predicate */,
  2134.     XPointer        /* arg */
  2135. #endif
  2136. );
  2137. */
  2138. extern Bool XCheckMaskEvent(
  2139. #if NeedFunctionPrototypes
  2140.     Display*        /* display */,
  2141.     long        /* event_mask */,
  2142.     XEvent*        /* event_return */
  2143. #endif
  2144. );
  2145.  
  2146. extern Bool XCheckTypedEvent(
  2147. #if NeedFunctionPrototypes
  2148.     Display*        /* display */,
  2149.     int            /* event_type */,
  2150.     XEvent*        /* event_return */
  2151. #endif
  2152. );
  2153.  
  2154. extern Bool XCheckTypedWindowEvent(
  2155. #if NeedFunctionPrototypes
  2156.     Display*        /* display */,
  2157.     Window        /* w */,
  2158.     int            /* event_type */,
  2159.     XEvent*        /* event_return */
  2160. #endif
  2161. );
  2162.  
  2163. extern Bool XCheckWindowEvent(
  2164. #if NeedFunctionPrototypes
  2165.     Display*        /* display */,
  2166.     Window        /* w */,
  2167.     long        /* event_mask */,
  2168.     XEvent*        /* event_return */
  2169. #endif
  2170. );
  2171.  
  2172. extern XCirculateSubwindows(
  2173. #if NeedFunctionPrototypes
  2174.     Display*        /* display */,
  2175.     Window        /* w */,
  2176.     int            /* direction */
  2177. #endif
  2178. );
  2179.  
  2180. extern XCirculateSubwindowsDown(
  2181. #if NeedFunctionPrototypes
  2182.     Display*        /* display */,
  2183.     Window        /* w */
  2184. #endif
  2185. );
  2186.  
  2187. extern XCirculateSubwindowsUp(
  2188. #if NeedFunctionPrototypes
  2189.     Display*        /* display */,
  2190.     Window        /* w */
  2191. #endif
  2192. );
  2193.  
  2194. extern XClearArea(
  2195. #if NeedFunctionPrototypes
  2196.     Display*        /* display */,
  2197.     Window        /* w */,
  2198.     int            /* x */,
  2199.     int            /* y */,
  2200.     unsigned int    /* width */,
  2201.     unsigned int    /* height */,
  2202.     Bool        /* exposures */
  2203. #endif
  2204. );
  2205.  
  2206. extern XClearWindow(
  2207. #if NeedFunctionPrototypes
  2208.     Display*        /* display */,
  2209.     Window        /* w */
  2210. #endif
  2211. );
  2212.  
  2213. extern XCloseDisplay(
  2214. #if NeedFunctionPrototypes
  2215.     Display*        /* display */
  2216. #endif
  2217. );
  2218.  
  2219. extern XConfigureWindow(
  2220. #if NeedFunctionPrototypes
  2221.     Display*        /* display */,
  2222.     Window        /* w */,
  2223.     unsigned int    /* value_mask */,
  2224.     XWindowChanges*    /* values */         
  2225. #endif
  2226. );
  2227.  
  2228. extern int XConnectionNumber(
  2229. #if NeedFunctionPrototypes
  2230.     Display*        /* display */
  2231. #endif
  2232. );
  2233.  
  2234. extern XConvertSelection(
  2235. #if NeedFunctionPrototypes
  2236.     Display*        /* display */,
  2237.     Atom        /* selection */,
  2238.     Atom         /* target */,
  2239.     Atom        /* property */,
  2240.     Window        /* requestor */,
  2241.     Time        /* time */
  2242. #endif
  2243. );
  2244.  
  2245. extern XCopyArea(
  2246. #if NeedFunctionPrototypes
  2247.     Display*        /* display */,
  2248.     Drawable        /* src */,
  2249.     Drawable        /* dest */,
  2250.     GC            /* gc */,
  2251.     int            /* src_x */,
  2252.     int            /* src_y */,
  2253.     unsigned int    /* width */,
  2254.     unsigned int    /* height */,
  2255.     int            /* dest_x */,
  2256.     int            /* dest_y */
  2257. #endif
  2258. );
  2259.  
  2260. extern XCopyGC(
  2261. #if NeedFunctionPrototypes
  2262.     Display*        /* display */,
  2263.     GC            /* src */,
  2264.     unsigned long    /* valuemask */,
  2265.     GC            /* dest */
  2266. #endif
  2267. );
  2268.  
  2269. extern XCopyPlane(
  2270. #if NeedFunctionPrototypes
  2271.     Display*        /* display */,
  2272.     Drawable        /* src */,
  2273.     Drawable        /* dest */,
  2274.     GC            /* gc */,
  2275.     int            /* src_x */,
  2276.     int            /* src_y */,
  2277.     unsigned int    /* width */,
  2278.     unsigned int    /* height */,
  2279.     int            /* dest_x */,
  2280.     int            /* dest_y */,
  2281.     unsigned long    /* plane */
  2282. #endif
  2283. );
  2284.  
  2285. extern int XDefaultDepth(
  2286. #if NeedFunctionPrototypes
  2287.     Display*        /* display */,
  2288.     int            /* screen_number */
  2289. #endif
  2290. );
  2291.  
  2292. extern int XDefaultDepthOfScreen(
  2293. #if NeedFunctionPrototypes
  2294.     Screen*        /* screen */
  2295. #endif
  2296. );
  2297.  
  2298. extern int XDefaultScreen(
  2299. #if NeedFunctionPrototypes
  2300.     Display*        /* display */
  2301. #endif
  2302. );
  2303.  
  2304. extern XDefineCursor(
  2305. #if NeedFunctionPrototypes
  2306.     Display*        /* display */,
  2307.     Window        /* w */,
  2308.     Cursor        /* cursor */
  2309. #endif
  2310. );
  2311.  
  2312. extern XDeleteProperty(
  2313. #if NeedFunctionPrototypes
  2314.     Display*        /* display */,
  2315.     Window        /* w */,
  2316.     Atom        /* property */
  2317. #endif
  2318. );
  2319.  
  2320. extern XDestroyWindow(
  2321. #if NeedFunctionPrototypes
  2322.     Display*        /* display */,
  2323.     Window        /* w */
  2324. #endif
  2325. );
  2326.  
  2327. extern XDestroySubwindows(
  2328. #if NeedFunctionPrototypes
  2329.     Display*        /* display */,
  2330.     Window        /* w */
  2331. #endif
  2332. );
  2333.  
  2334. extern int XDoesBackingStore(
  2335. #if NeedFunctionPrototypes
  2336.     Screen*        /* screen */    
  2337. #endif
  2338. );
  2339.  
  2340. extern Bool XDoesSaveUnders(
  2341. #if NeedFunctionPrototypes
  2342.     Screen*        /* screen */
  2343. #endif
  2344. );
  2345.  
  2346. extern XDisableAccessControl(
  2347. #if NeedFunctionPrototypes
  2348.     Display*        /* display */
  2349. #endif
  2350. );
  2351.  
  2352.  
  2353. extern int XDisplayCells(
  2354. #if NeedFunctionPrototypes
  2355.     Display*        /* display */,
  2356.     int            /* screen_number */
  2357. #endif
  2358. );
  2359.  
  2360. extern int XDisplayHeight(
  2361. #if NeedFunctionPrototypes
  2362.     Display*        /* display */,
  2363.     int            /* screen_number */
  2364. #endif
  2365. );
  2366.  
  2367. extern int XDisplayHeightMM(
  2368. #if NeedFunctionPrototypes
  2369.     Display*        /* display */,
  2370.     int            /* screen_number */
  2371. #endif
  2372. );
  2373.  
  2374. extern XDisplayKeycodes(
  2375. #if NeedFunctionPrototypes
  2376.     Display*        /* display */,
  2377.     int*        /* min_keycodes_return */,
  2378.     int*        /* max_keycodes_return */
  2379. #endif
  2380. );
  2381.  
  2382. extern int XDisplayPlanes(
  2383. #if NeedFunctionPrototypes
  2384.     Display*        /* display */,
  2385.     int            /* screen_number */
  2386. #endif
  2387. );
  2388.  
  2389. extern int XDisplayWidth(
  2390. #if NeedFunctionPrototypes
  2391.     Display*        /* display */,
  2392.     int            /* screen_number */
  2393. #endif
  2394. );
  2395.  
  2396. extern int XDisplayWidthMM(
  2397. #if NeedFunctionPrototypes
  2398.     Display*        /* display */,
  2399.     int            /* screen_number */
  2400. #endif
  2401. );
  2402.  
  2403. extern XDrawArc(
  2404. #if NeedFunctionPrototypes
  2405.     Display*        /* display */,
  2406.     Drawable        /* d */,
  2407.     GC            /* gc */,
  2408.     int            /* x */,
  2409.     int            /* y */,
  2410.     unsigned int    /* width */,
  2411.     unsigned int    /* height */,
  2412.     int            /* angle1 */,
  2413.     int            /* angle2 */
  2414. #endif
  2415. );
  2416.  
  2417. extern XDrawArcs(
  2418. #if NeedFunctionPrototypes
  2419.     Display*        /* display */,
  2420.     Drawable        /* d */,
  2421.     GC            /* gc */,
  2422.     XArc*        /* arcs */,
  2423.     int            /* narcs */
  2424. #endif
  2425. );
  2426.  
  2427. extern XDrawImageString(
  2428. #if NeedFunctionPrototypes
  2429.     Display*        /* display */,
  2430.     Drawable        /* d */,
  2431.     GC            /* gc */,
  2432.     int            /* x */,
  2433.     int            /* y */,
  2434.     char*    /* string */,
  2435.     int            /* length */
  2436. #endif
  2437. );
  2438.  
  2439. extern XDrawImageString16(
  2440. #if NeedFunctionPrototypes
  2441.     Display*        /* display */,
  2442.     Drawable        /* d */,
  2443.     GC            /* gc */,
  2444.     int            /* x */,
  2445.     int            /* y */,
  2446.     char*    /* string */,
  2447.     int            /* length */
  2448. #endif
  2449. );
  2450.  
  2451. extern XDrawLine(
  2452. #if NeedFunctionPrototypes
  2453.     Display*        /* display */,
  2454.     Drawable        /* d */,
  2455.     GC            /* gc */,
  2456.     int            /* x1 */,
  2457.     int            /* x2 */,
  2458.     int            /* y1 */,
  2459.     int            /* y2 */
  2460. #endif
  2461. );
  2462.  
  2463. extern XDrawLines(
  2464. #if NeedFunctionPrototypes
  2465.     Display*        /* display */,
  2466.     Drawable        /* d */,
  2467.     GC            /* gc */,
  2468.     XPoint*        /* points */,
  2469.     int            /* npoints */,
  2470.     int            /* mode */
  2471. #endif
  2472. );
  2473.  
  2474. extern XDrawPoint(
  2475. #if NeedFunctionPrototypes
  2476.     Display*        /* display */,
  2477.     Drawable        /* d */,
  2478.     GC            /* gc */,
  2479.     int            /* x */,
  2480.     int            /* y */
  2481. #endif
  2482. );
  2483.  
  2484. extern XDrawPoints(
  2485. #if NeedFunctionPrototypes
  2486.     Display*        /* display */,
  2487.     Drawable        /* d */,
  2488.     GC            /* gc */,
  2489.     XPoint*        /* points */,
  2490.     int            /* npoints */,
  2491.     int            /* mode */
  2492. #endif
  2493. );
  2494.  
  2495. extern XDrawRectangle(
  2496. #if NeedFunctionPrototypes
  2497.     Display*        /* display */,
  2498.     Drawable        /* d */,
  2499.     GC            /* gc */,
  2500.     int            /* x */,
  2501.     int            /* y */,
  2502.     unsigned int    /* width */,
  2503.     unsigned int    /* height */
  2504. #endif
  2505. );
  2506.  
  2507. extern XDrawRectangles(
  2508. #if NeedFunctionPrototypes
  2509.     Display*        /* display */,
  2510.     Drawable        /* d */,
  2511.     GC            /* gc */,
  2512.     XRectangle*        /* rectangles */,
  2513.     int            /* nrectangles */
  2514. #endif
  2515. );
  2516.  
  2517. extern XDrawSegments(
  2518. #if NeedFunctionPrototypes
  2519.     Display*        /* display */,
  2520.     Drawable        /* d */,
  2521.     GC            /* gc */,
  2522.     XSegment*        /* segments */,
  2523.     int            /* nsegments */
  2524. #endif
  2525. );
  2526.  
  2527. extern XDrawString(
  2528. #if NeedFunctionPrototypes
  2529.     Display*        /* display */,
  2530.     Drawable        /* d */,
  2531.     GC            /* gc */,
  2532.     int            /* x */,
  2533.     int            /* y */,
  2534.     char*    /* string */,
  2535.     int            /* length */
  2536. #endif
  2537. );
  2538.  
  2539. extern XDrawString16(
  2540. #if NeedFunctionPrototypes
  2541.     Display*        /* display */,
  2542.     Drawable        /* d */,
  2543.     GC            /* gc */,
  2544.     int            /* x */,
  2545.     int            /* y */,
  2546.     char*    /* string */,
  2547.     int            /* length */
  2548. #endif
  2549. );
  2550.  
  2551. extern XDrawText(
  2552. #if NeedFunctionPrototypes
  2553.     Display*        /* display */,
  2554.     Drawable        /* d */,
  2555.     GC            /* gc */,
  2556.     int            /* x */,
  2557.     int            /* y */,
  2558.     XTextItem*        /* items */,
  2559.     int            /* nitems */
  2560. #endif
  2561. );
  2562.  
  2563. extern XDrawText16(
  2564. #if NeedFunctionPrototypes
  2565.     Display*        /* display */,
  2566.     Drawable        /* d */,
  2567.     GC            /* gc */,
  2568.     int            /* x */,
  2569.     int            /* y */,
  2570.     XTextItem16*    /* items */,
  2571.     int            /* nitems */
  2572. #endif
  2573. );
  2574.  
  2575. extern XEnableAccessControl(
  2576. #if NeedFunctionPrototypes
  2577.     Display*        /* display */
  2578. #endif
  2579. );
  2580.  
  2581. extern int XEventsQueued(
  2582. #if NeedFunctionPrototypes
  2583.     Display*        /* display */,
  2584.     int            /* mode */
  2585. #endif
  2586. );
  2587.  
  2588. extern Status XFetchName(
  2589. #if NeedFunctionPrototypes
  2590.     Display*        /* display */,
  2591.     Window        /* w */,
  2592.     char**        /* window_name_return */
  2593. #endif
  2594. );
  2595.  
  2596. extern XFillArc(
  2597. #if NeedFunctionPrototypes
  2598.     Display*        /* display */,
  2599.     Drawable        /* d */,
  2600.     GC            /* gc */,
  2601.     int            /* x */,
  2602.     int            /* y */,
  2603.     unsigned int    /* width */,
  2604.     unsigned int    /* height */,
  2605.     int            /* angle1 */,
  2606.     int            /* angle2 */
  2607. #endif
  2608. );
  2609.  
  2610. extern XFillArcs(
  2611. #if NeedFunctionPrototypes
  2612.     Display*        /* display */,
  2613.     Drawable        /* d */,
  2614.     GC            /* gc */,
  2615.     XArc*        /* arcs */,
  2616.     int            /* narcs */
  2617. #endif
  2618. );
  2619.  
  2620. extern XFillPolygon(
  2621. #if NeedFunctionPrototypes
  2622.     Display*        /* display */,
  2623.     Drawable        /* d */,
  2624.     GC            /* gc */,
  2625.     XPoint*        /* points */,
  2626.     int            /* npoints */,
  2627.     int            /* shape */,
  2628.     int            /* mode */
  2629. #endif
  2630. );
  2631.  
  2632. extern XFillRectangle(
  2633. #if NeedFunctionPrototypes
  2634.     Display*        /* display */,
  2635.     Drawable        /* d */,
  2636.     GC            /* gc */,
  2637.     int            /* x */,
  2638.     int            /* y */,
  2639.     unsigned int    /* width */,
  2640.     unsigned int    /* height */
  2641. #endif
  2642. );
  2643.  
  2644. extern XFillRectangles(
  2645. #if NeedFunctionPrototypes
  2646.     Display*        /* display */,
  2647.     Drawable        /* d */,
  2648.     GC            /* gc */,
  2649.     XRectangle*        /* rectangles */,
  2650.     int            /* nrectangles */
  2651. #endif
  2652. );
  2653.  
  2654. extern XFlush(
  2655. #if NeedFunctionPrototypes
  2656.     Display*        /* display */
  2657. #endif
  2658. );
  2659.  
  2660. extern XForceScreenSaver(
  2661. #if NeedFunctionPrototypes
  2662.     Display*        /* display */,
  2663.     int            /* mode */
  2664. #endif
  2665. );
  2666.  
  2667. extern XFree(
  2668. #if NeedFunctionPrototypes
  2669.     void*        /* data */
  2670. #endif
  2671. );
  2672.  
  2673. extern XFreeColormap(
  2674. #if NeedFunctionPrototypes
  2675.     Display*        /* display */,
  2676.     Colormap        /* colormap */
  2677. #endif
  2678. );
  2679.  
  2680. extern XFreeColors(
  2681. #if NeedFunctionPrototypes
  2682.     Display*        /* display */,
  2683.     Colormap        /* colormap */,
  2684.     unsigned long*    /* pixels */,
  2685.     int            /* npixels */,
  2686.     unsigned long    /* planes */
  2687. #endif
  2688. );
  2689.  
  2690. extern XFreeCursor(
  2691. #if NeedFunctionPrototypes
  2692.     Display*        /* display */,
  2693.     Cursor        /* cursor */
  2694. #endif
  2695. );
  2696.  
  2697. extern XFreeExtensionList(
  2698. #if NeedFunctionPrototypes
  2699.     char**        /* list */    
  2700. #endif
  2701. );
  2702.  
  2703. extern XFreeFont(
  2704. #if NeedFunctionPrototypes
  2705.     Display*        /* display */,
  2706.     XFontStruct*    /* font_struct */
  2707. #endif
  2708. );
  2709.  
  2710. extern XFreeFontInfo(
  2711. #if NeedFunctionPrototypes
  2712.     char**        /* names */,
  2713.     XFontStruct*    /* free_info */,
  2714.     int            /* actual_count */
  2715. #endif
  2716. );
  2717.  
  2718. extern XFreeFontNames(
  2719. #if NeedFunctionPrototypes
  2720.     char**        /* list */
  2721. #endif
  2722. );
  2723.  
  2724. extern XFreeFontPath(
  2725. #if NeedFunctionPrototypes
  2726.     char**        /* list */
  2727. #endif
  2728. );
  2729.  
  2730. extern XFreeGC(
  2731. #if NeedFunctionPrototypes
  2732.     Display*        /* display */,
  2733.     GC            /* gc */
  2734. #endif
  2735. );
  2736.  
  2737. extern XFreeModifiermap(
  2738. #if NeedFunctionPrototypes
  2739.     XModifierKeymap*    /* modmap */
  2740. #endif
  2741. );
  2742.  
  2743. extern XFreePixmap(
  2744. #if NeedFunctionPrototypes
  2745.     Display*        /* display */,
  2746.     Pixmap        /* pixmap */
  2747. #endif
  2748. );
  2749.  
  2750. extern int XGeometry(
  2751. #if NeedFunctionPrototypes
  2752.     Display*        /* display */,
  2753.     int            /* screen */,
  2754.      char*    /* position */,
  2755.      char*    /* default_position */,
  2756.     unsigned int    /* bwidth */,
  2757.     unsigned int    /* fwidth */,
  2758.     unsigned int    /* fheight */,
  2759.     int            /* xadder */,
  2760.     int            /* yadder */,
  2761.     int*        /* x_return */,
  2762.     int*        /* y_return */,
  2763.     int*        /* width_return */,
  2764.     int*        /* height_return */
  2765. #endif
  2766. );
  2767.  
  2768. extern XGetErrorDatabaseText(
  2769. #if NeedFunctionPrototypes
  2770.     Display*        /* display */,
  2771.      char*    /* name */,
  2772.      char*    /* message */,
  2773.      char*    /* default_string */,
  2774.     char*        /* buffer_return */,
  2775.     int            /* length */
  2776. #endif
  2777. );
  2778.  
  2779. extern XGetErrorText(
  2780. #if NeedFunctionPrototypes
  2781.     Display*        /* display */,
  2782.     int            /* code */,
  2783.     char*        /* buffer_return */,
  2784.     int            /* length */
  2785. #endif
  2786. );
  2787.  
  2788. extern Bool XGetFontProperty(
  2789. #if NeedFunctionPrototypes
  2790.     XFontStruct*    /* font_struct */,
  2791.     Atom        /* atom */,
  2792.     unsigned long*    /* value_return */
  2793. #endif
  2794. );
  2795.  
  2796. extern Status XGetGCValues(
  2797. #if NeedFunctionPrototypes
  2798.     Display*        /* display */,
  2799.     GC            /* gc */,
  2800.     unsigned long    /* valuemask */,
  2801.     XGCValues*        /* values_return */
  2802. #endif
  2803. );
  2804.  
  2805. extern Status XGetGeometry(
  2806. #if NeedFunctionPrototypes
  2807.     Display*        /* display */,
  2808.     Drawable        /* d */,
  2809.     Window*        /* root_return */,
  2810.     int*        /* x_return */,
  2811.     int*        /* y_return */,
  2812.     unsigned int*    /* width_return */,
  2813.     unsigned int*    /* height_return */,
  2814.     unsigned int*    /* border_width_return */,
  2815.     unsigned int*    /* depth_return */
  2816. #endif
  2817. );
  2818.  
  2819. extern Status XGetIconName(
  2820. #if NeedFunctionPrototypes
  2821.     Display*        /* display */,
  2822.     Window        /* w */,
  2823.     char**        /* icon_name_return */
  2824. #endif
  2825. );
  2826.  
  2827. extern XGetInputFocus(
  2828. #if NeedFunctionPrototypes
  2829.     Display*        /* display */,
  2830.     Window*        /* focus_return */,
  2831.     int*        /* revert_to_return */
  2832. #endif
  2833. );
  2834.  
  2835. extern XGetKeyboardControl(
  2836. #if NeedFunctionPrototypes
  2837.     Display*        /* display */,
  2838.     XKeyboardState*    /* values_return */
  2839. #endif
  2840. );
  2841.  
  2842. extern XGetPointerControl(
  2843. #if NeedFunctionPrototypes
  2844.     Display*        /* display */,
  2845.     int*        /* accel_numerator_return */,
  2846.     int*        /* accel_denominator_return */,
  2847.     int*        /* threshold_return */
  2848. #endif
  2849. );
  2850.  
  2851. extern int XGetPointerMapping(
  2852. #if NeedFunctionPrototypes
  2853.     Display*        /* display */,
  2854.     unsigned char*    /* map_return */,
  2855.     int            /* nmap */
  2856. #endif
  2857. );
  2858.  
  2859. extern XGetScreenSaver(
  2860. #if NeedFunctionPrototypes
  2861.     Display*        /* display */,
  2862.     int*        /* timeout_return */,
  2863.     int*        /* interval_return */,
  2864.     int*        /* prefer_blanking_return */,
  2865.     int*        /* allow_exposures_return */
  2866. #endif
  2867. );
  2868.  
  2869. extern Status XGetTransientForHint(
  2870. #if NeedFunctionPrototypes
  2871.     Display*        /* display */,
  2872.     Window        /* w */,
  2873.     Window*        /* prop_window_return */
  2874. #endif
  2875. );
  2876.  
  2877. extern int XGetWindowProperty(
  2878. #if NeedFunctionPrototypes
  2879.     Display*        /* display */,
  2880.     Window        /* w */,
  2881.     Atom        /* property */,
  2882.     long        /* long_offset */,
  2883.     long        /* long_length */,
  2884.     Bool        /* delete */,
  2885.     Atom        /* req_type */,
  2886.     Atom*        /* actual_type_return */,
  2887.     int*        /* actual_format_return */,
  2888.     unsigned long*    /* nitems_return */,
  2889.     unsigned long*    /* bytes_after_return */,
  2890.     unsigned char**    /* prop_return */
  2891. #endif
  2892. );
  2893.  
  2894. extern Status XGetWindowAttributes(
  2895. #if NeedFunctionPrototypes
  2896.     Display*        /* display */,
  2897.     Window        /* w */,
  2898.     XWindowAttributes*    /* window_attributes_return */
  2899. #endif
  2900. );
  2901.  
  2902. extern XGrabButton(
  2903. #if NeedFunctionPrototypes
  2904.     Display*        /* display */,
  2905.     unsigned int    /* button */,
  2906.     unsigned int    /* modifiers */,
  2907.     Window        /* grab_window */,
  2908.     Bool        /* owner_events */,
  2909.     unsigned int    /* event_mask */,
  2910.     int            /* pointer_mode */,
  2911.     int            /* keyboard_mode */,
  2912.     Window        /* confine_to */,
  2913.     Cursor        /* cursor */
  2914. #endif
  2915. );
  2916.  
  2917. extern XGrabKey(
  2918. #if NeedFunctionPrototypes
  2919.     Display*        /* display */,
  2920.     int            /* keycode */,
  2921.     unsigned int    /* modifiers */,
  2922.     Window        /* grab_window */,
  2923.     Bool        /* owner_events */,
  2924.     int            /* pointer_mode */,
  2925.     int            /* keyboard_mode */
  2926. #endif
  2927. );
  2928.  
  2929. extern int XGrabKeyboard(
  2930. #if NeedFunctionPrototypes
  2931.     Display*        /* display */,
  2932.     Window        /* grab_window */,
  2933.     Bool        /* owner_events */,
  2934.     int            /* pointer_mode */,
  2935.     int            /* keyboard_mode */,
  2936.     Time        /* time */
  2937. #endif
  2938. );
  2939.  
  2940. extern int XGrabPointer(
  2941. #if NeedFunctionPrototypes
  2942.     Display*        /* display */,
  2943.     Window        /* grab_window */,
  2944.     Bool        /* owner_events */,
  2945.     unsigned int    /* event_mask */,
  2946.     int            /* pointer_mode */,
  2947.     int            /* keyboard_mode */,
  2948.     Window        /* confine_to */,
  2949.     Cursor        /* cursor */,
  2950.     Time        /* time */
  2951. #endif
  2952. );
  2953.  
  2954. extern XGrabServer(
  2955. #if NeedFunctionPrototypes
  2956.     Display*        /* display */
  2957. #endif
  2958. );
  2959.  
  2960. extern int XHeightMMOfScreen(
  2961. #if NeedFunctionPrototypes
  2962.     Screen*        /* screen */
  2963. #endif
  2964. );
  2965.  
  2966. extern int XHeightOfScreen(
  2967. #if NeedFunctionPrototypes
  2968.     Screen*        /* screen */
  2969. #endif
  2970. );
  2971.  
  2972. extern XIfEvent( Display* display,
  2973.       XEvent* event_return,
  2974.       Bool (*
  2975. #if 1
  2976. __stdargs
  2977. #endif
  2978.         predicate)(Display *,XEvent*,char *data),
  2979.       char* args );
  2980.  
  2981. /*
  2982. extern XIfEvent(
  2983. #if NeedFunctionPrototypes
  2984.     Display*        /* display */,
  2985.     XEvent*        /* event_return */,
  2986.     Bool (*) (
  2987. #if NeedNestedPrototypes
  2988.            Display*            /* display */,
  2989.                XEvent*            /* event */,
  2990.                XPointer            /* arg */
  2991. #endif
  2992.              )        /* predicate */,
  2993.     XPointer        /* arg */
  2994. #endif
  2995. );
  2996. */
  2997. extern int XImageByteOrder(
  2998. #if NeedFunctionPrototypes
  2999.     Display*        /* display */
  3000. #endif
  3001. );
  3002.  
  3003. extern XInstallColormap(
  3004. #if NeedFunctionPrototypes
  3005.     Display*        /* display */,
  3006.     Colormap        /* colormap */
  3007. #endif
  3008. );
  3009.  
  3010. extern KeyCode XKeysymToKeycode(
  3011. #if NeedFunctionPrototypes
  3012.     Display*        /* display */,
  3013.     KeySym        /* keysym */
  3014. #endif
  3015. );
  3016.  
  3017. extern XKillClient(
  3018. #if NeedFunctionPrototypes
  3019.     Display*        /* display */,
  3020.     XID            /* resource */
  3021. #endif
  3022. );
  3023.  
  3024. extern unsigned long XLastKnownRequestProcessed(
  3025. #if NeedFunctionPrototypes
  3026.     Display*        /* display */
  3027. #endif
  3028. );
  3029.  
  3030. extern Status XLookupColor(
  3031. #if NeedFunctionPrototypes
  3032.     Display*        /* display */,
  3033.     Colormap        /* colormap */,
  3034.     char*    /* color_name */,
  3035.     XColor*        /* exact_def_return */,
  3036.     XColor*        /* screen_def_return */
  3037. #endif
  3038. );
  3039.  
  3040. extern XLowerWindow(
  3041. #if NeedFunctionPrototypes
  3042.     Display*        /* display */,
  3043.     Window        /* w */
  3044. #endif
  3045. );
  3046.  
  3047. extern XMapRaised(
  3048. #if NeedFunctionPrototypes
  3049.     Display*        /* display */,
  3050.     Window        /* w */
  3051. #endif
  3052. );
  3053.  
  3054. extern XMapSubwindows(
  3055. #if NeedFunctionPrototypes
  3056.     Display*        /* display */,
  3057.     Window        /* w */
  3058. #endif
  3059. );
  3060.  
  3061. extern XMapWindow(
  3062. #if NeedFunctionPrototypes
  3063.     Display*        /* display */,
  3064.     Window        /* w */
  3065. #endif
  3066. );
  3067.  
  3068. extern XMaskEvent(
  3069. #if NeedFunctionPrototypes
  3070.     Display*        /* display */,
  3071.     long        /* event_mask */,
  3072.     XEvent*        /* event_return */
  3073. #endif
  3074. );
  3075.  
  3076. extern int XMaxCmapsOfScreen(
  3077. #if NeedFunctionPrototypes
  3078.     Screen*        /* screen */
  3079. #endif
  3080. );
  3081.  
  3082. extern int XMinCmapsOfScreen(
  3083. #if NeedFunctionPrototypes
  3084.     Screen*        /* screen */
  3085. #endif
  3086. );
  3087.  
  3088. extern XMoveResizeWindow(
  3089. #if NeedFunctionPrototypes
  3090.     Display*        /* display */,
  3091.     Window        /* w */,
  3092.     int            /* x */,
  3093.     int            /* y */,
  3094.     unsigned int    /* width */,
  3095.     unsigned int    /* height */
  3096. #endif
  3097. );
  3098.  
  3099. extern XMoveWindow(
  3100. #if NeedFunctionPrototypes
  3101.     Display*        /* display */,
  3102.     Window        /* w */,
  3103.     int            /* x */,
  3104.     int            /* y */
  3105. #endif
  3106. );
  3107.  
  3108. extern XNextEvent(
  3109. #if NeedFunctionPrototypes
  3110.     Display*        /* display */,
  3111.     XEvent*        /* event_return */
  3112. #endif
  3113. );
  3114.  
  3115. extern XNoOp(
  3116. #if NeedFunctionPrototypes
  3117.     Display*        /* display */
  3118. #endif
  3119. );
  3120.  
  3121. extern Status XParseColor(
  3122. #if NeedFunctionPrototypes
  3123.     Display*        /* display */,
  3124.     Colormap        /* colormap */,
  3125.     char*    /* spec */,
  3126.     XColor*        /* exact_def_return */
  3127. #endif
  3128. );
  3129.  
  3130. extern int XParseGeometry(
  3131. #if NeedFunctionPrototypes
  3132.     char*    /* parsestring */,
  3133.     int*        /* x_return */,
  3134.     int*        /* y_return */,
  3135.     unsigned int*    /* width_return */,
  3136.     unsigned int*    /* height_return */
  3137. #endif
  3138. );
  3139.  
  3140. extern XPeekEvent(
  3141. #if NeedFunctionPrototypes
  3142.     Display*        /* display */,
  3143.     XEvent*        /* event_return */
  3144. #endif
  3145. );
  3146.  
  3147. XPeekIfEvent( Display* display,
  3148.           XEvent* event_return,
  3149.           Bool (*
  3150. #if 1
  3151. __stdargs
  3152. #endif
  3153.             predicate)(Display *,XEvent*,char *data),
  3154.           XPointer arg );
  3155.  
  3156. /*
  3157. extern XPeekIfEvent(
  3158. #if NeedFunctionPrototypes
  3159.     Display*        /* display */,
  3160.     XEvent*        /* event_return */,
  3161.     Bool (*) (
  3162. #if NeedNestedPrototypes
  3163.            Display*        /* display */,
  3164.                XEvent*        /* event */,
  3165.                XPointer        /* arg */
  3166. #endif
  3167.              )        /* predicate */,
  3168.     XPointer        /* arg */
  3169. #endif
  3170. );
  3171. */
  3172. extern int XPending(
  3173. #if NeedFunctionPrototypes
  3174.     Display*        /* display */
  3175. #endif
  3176. );
  3177.  
  3178. extern int XPlanesOfScreen(
  3179. #if NeedFunctionPrototypes
  3180.     Screen*        /* screen */
  3181.     
  3182. #endif
  3183. );
  3184.  
  3185. extern int XProtocolRevision(
  3186. #if NeedFunctionPrototypes
  3187.     Display*        /* display */
  3188. #endif
  3189. );
  3190.  
  3191. extern int XProtocolVersion(
  3192. #if NeedFunctionPrototypes
  3193.     Display*        /* display */
  3194. #endif
  3195. );
  3196.  
  3197.  
  3198. extern XPutBackEvent(
  3199. #if NeedFunctionPrototypes
  3200.     Display*        /* display */,
  3201.     XEvent*        /* event */
  3202. #endif
  3203. );
  3204.  
  3205. extern XPutImage(
  3206. #if NeedFunctionPrototypes
  3207.     Display*        /* display */,
  3208.     Drawable        /* d */,
  3209.     GC            /* gc */,
  3210.     XImage*        /* image */,
  3211.     int            /* src_x */,
  3212.     int            /* src_y */,
  3213.     int            /* dest_x */,
  3214.     int            /* dest_y */,
  3215.     unsigned int    /* width */,
  3216.     unsigned int    /* height */      
  3217. #endif
  3218. );
  3219.  
  3220. extern int XQLength(
  3221. #if NeedFunctionPrototypes
  3222.     Display*        /* display */
  3223. #endif
  3224. );
  3225.  
  3226. extern Status XQueryBestCursor(
  3227. #if NeedFunctionPrototypes
  3228.     Display*        /* display */,
  3229.     Drawable        /* d */,
  3230.     unsigned int        /* width */,
  3231.     unsigned int    /* height */,
  3232.     unsigned int*    /* width_return */,
  3233.     unsigned int*    /* height_return */
  3234. #endif
  3235. );
  3236.  
  3237. extern Status XQueryBestSize(
  3238. #if NeedFunctionPrototypes
  3239.     Display*        /* display */,
  3240.     int            /* class */,
  3241.     Drawable        /* which_screen */,
  3242.     unsigned int    /* width */,
  3243.     unsigned int    /* height */,
  3244.     unsigned int*    /* width_return */,
  3245.     unsigned int*    /* height_return */
  3246. #endif
  3247. );
  3248.  
  3249. extern Status XQueryBestStipple(
  3250. #if NeedFunctionPrototypes
  3251.     Display*        /* display */,
  3252.     Drawable        /* which_screen */,
  3253.     unsigned int    /* width */,
  3254.     unsigned int    /* height */,
  3255.     unsigned int*    /* width_return */,
  3256.     unsigned int*    /* height_return */
  3257. #endif
  3258. );
  3259.  
  3260. extern Status XQueryBestTile(
  3261. #if NeedFunctionPrototypes
  3262.     Display*        /* display */,
  3263.     Drawable        /* which_screen */,
  3264.     unsigned int    /* width */,
  3265.     unsigned int    /* height */,
  3266.     unsigned int*    /* width_return */,
  3267.     unsigned int*    /* height_return */
  3268. #endif
  3269. );
  3270.  
  3271. extern XQueryColor(
  3272. #if NeedFunctionPrototypes
  3273.     Display*        /* display */,
  3274.     Colormap        /* colormap */,
  3275.     XColor*        /* def_in_out */
  3276. #endif
  3277. );
  3278.  
  3279. extern XQueryColors(
  3280. #if NeedFunctionPrototypes
  3281.     Display*        /* display */,
  3282.     Colormap        /* colormap */,
  3283.     XColor*        /* defs_in_out */,
  3284.     int            /* ncolors */
  3285. #endif
  3286. );
  3287.  
  3288. extern Bool XQueryExtension(
  3289. #if NeedFunctionPrototypes
  3290.     Display*        /* display */,
  3291.      char*    /* name */,
  3292.     int*        /* major_opcode_return */,
  3293.     int*        /* first_event_return */,
  3294.     int*        /* first_error_return */
  3295. #endif
  3296. );
  3297.  
  3298. extern XQueryKeymap(
  3299. #if NeedFunctionPrototypes
  3300.     Display*        /* display */,
  3301.     char [32]        /* keys_return */
  3302. #endif
  3303. );
  3304.  
  3305. extern Bool XQueryPointer(
  3306. #if NeedFunctionPrototypes
  3307.     Display*        /* display */,
  3308.     Window        /* w */,
  3309.     Window*        /* root_return */,
  3310.     Window*        /* child_return */,
  3311.     int*        /* root_x_return */,
  3312.     int*        /* root_y_return */,
  3313.     int*        /* win_x_return */,
  3314.     int*        /* win_y_return */,
  3315.     unsigned int*       /* mask_return */
  3316. #endif
  3317. );
  3318.  
  3319. extern XQueryTextExtents(
  3320. #if NeedFunctionPrototypes
  3321.     Display*        /* display */,
  3322.     XID            /* font_ID */,
  3323.      char*    /* string */,
  3324.     int            /* nchars */,
  3325.     int*        /* direction_return */,
  3326.     int*        /* font_ascent_return */,
  3327.     int*        /* font_descent_return */,
  3328.     XCharStruct*    /* overall_return */    
  3329. #endif
  3330. );
  3331.  
  3332. extern XQueryTextExtents16(
  3333. #if NeedFunctionPrototypes
  3334.     Display*        /* display */,
  3335.     XID            /* font_ID */,
  3336.      XChar2b*    /* string */,
  3337.     int            /* nchars */,
  3338.     int*        /* direction_return */,
  3339.     int*        /* font_ascent_return */,
  3340.     int*        /* font_descent_return */,
  3341.     XCharStruct*    /* overall_return */
  3342. #endif
  3343. );
  3344.  
  3345. extern Status XQueryTree(
  3346. #if NeedFunctionPrototypes
  3347.     Display*        /* display */,
  3348.     Window        /* w */,
  3349.     Window*        /* root_return */,
  3350.     Window*        /* parent_return */,
  3351.     Window**        /* children_return */,
  3352.     unsigned int*    /* nchildren_return */
  3353. #endif
  3354. );
  3355.  
  3356. extern XRaiseWindow(
  3357. #if NeedFunctionPrototypes
  3358.     Display*        /* display */,
  3359.     Window        /* w */
  3360. #endif
  3361. );
  3362.  
  3363. extern int XReadBitmapFile(
  3364. #if NeedFunctionPrototypes
  3365.     Display*        /* display */,
  3366.     Drawable         /* d */,
  3367.     char*    /* filename */,
  3368.     unsigned int*    /* width_return */,
  3369.     unsigned int*    /* height_return */,
  3370.     Pixmap*        /* bitmap_return */,
  3371.     int*        /* x_hot_return */,
  3372.     int*        /* y_hot_return */
  3373. #endif
  3374. );
  3375.  
  3376. extern XRebindKeysym(
  3377. #if NeedFunctionPrototypes
  3378.     Display*        /* display */,
  3379.     KeySym        /* keysym */,
  3380.     KeySym*        /* list */,
  3381.     int            /* mod_count */,
  3382.      unsigned char*    /* string */,
  3383.     int            /* bytes_string */
  3384. #endif
  3385. );
  3386.  
  3387. extern XRecolorCursor(
  3388. #if NeedFunctionPrototypes
  3389.     Display*        /* display */,
  3390.     Cursor        /* cursor */,
  3391.     XColor*        /* foreground_color */,
  3392.     XColor*        /* background_color */
  3393. #endif
  3394. );
  3395.  
  3396. extern XRefreshKeyboardMapping(
  3397. #if NeedFunctionPrototypes
  3398.     XMappingEvent*    /* event_map */    
  3399. #endif
  3400. );
  3401.  
  3402. extern XRemoveFromSaveSet(
  3403. #if NeedFunctionPrototypes
  3404.     Display*        /* display */,
  3405.     Window        /* w */
  3406. #endif
  3407. );
  3408.  
  3409. extern XRemoveHost(
  3410. #if NeedFunctionPrototypes
  3411.     Display*        /* display */,
  3412.     XHostAddress*    /* host */
  3413. #endif
  3414. );
  3415.  
  3416. extern XRemoveHosts(
  3417. #if NeedFunctionPrototypes
  3418.     Display*        /* display */,
  3419.     XHostAddress*    /* hosts */,
  3420.     int            /* num_hosts */
  3421. #endif
  3422. );
  3423.  
  3424. extern XReparentWindow(
  3425. #if NeedFunctionPrototypes
  3426.     Display*        /* display */,
  3427.     Window        /* w */,
  3428.     Window        /* parent */,
  3429.     int            /* x */,
  3430.     int            /* y */
  3431. #endif
  3432. );
  3433.  
  3434. extern XResetScreenSaver(
  3435. #if NeedFunctionPrototypes
  3436.     Display*        /* display */
  3437. #endif
  3438. );
  3439.  
  3440. extern XResizeWindow(
  3441. #if NeedFunctionPrototypes
  3442.     Display*        /* display */,
  3443.     Window        /* w */,
  3444.     unsigned int    /* width */,
  3445.     unsigned int    /* height */
  3446. #endif
  3447. );
  3448.  
  3449. extern XRestackWindows(
  3450. #if NeedFunctionPrototypes
  3451.     Display*        /* display */,
  3452.     Window*        /* windows */,
  3453.     int            /* nwindows */
  3454. #endif
  3455. );
  3456.  
  3457. extern XRotateBuffers(
  3458. #if NeedFunctionPrototypes
  3459.     Display*        /* display */,
  3460.     int            /* rotate */
  3461. #endif
  3462. );
  3463.  
  3464. extern XRotateWindowProperties(
  3465. #if NeedFunctionPrototypes
  3466.     Display*        /* display */,
  3467.     Window        /* w */,
  3468.     Atom*        /* properties */,
  3469.     int            /* num_prop */,
  3470.     int            /* npositions */
  3471. #endif
  3472. );
  3473.  
  3474. extern int XScreenCount(
  3475. #if NeedFunctionPrototypes
  3476.     Display*        /* display */
  3477. #endif
  3478. );
  3479.  
  3480. extern XSelectInput(
  3481. #if NeedFunctionPrototypes
  3482.     Display*        /* display */,
  3483.     Window        /* w */,
  3484.     long        /* event_mask */
  3485. #endif
  3486. );
  3487.  
  3488. extern Status XSendEvent(
  3489. #if NeedFunctionPrototypes
  3490.     Display*        /* display */,
  3491.     Window        /* w */,
  3492.     Bool        /* propagate */,
  3493.     long        /* event_mask */,
  3494.     XEvent*        /* event_send */
  3495. #endif
  3496. );
  3497.  
  3498. extern XSetAccessControl(
  3499. #if NeedFunctionPrototypes
  3500.     Display*        /* display */,
  3501.     int            /* mode */
  3502. #endif
  3503. );
  3504.  
  3505. extern XSetArcMode(
  3506. #if NeedFunctionPrototypes
  3507.     Display*        /* display */,
  3508.     GC            /* gc */,
  3509.     int            /* arc_mode */
  3510. #endif
  3511. );
  3512.  
  3513. extern XSetBackground(
  3514. #if NeedFunctionPrototypes
  3515.     Display*        /* display */,
  3516.     GC            /* gc */,
  3517.     unsigned long    /* background */
  3518. #endif
  3519. );
  3520.  
  3521. extern XSetClipMask(
  3522. #if NeedFunctionPrototypes
  3523.     Display*        /* display */,
  3524.     GC            /* gc */,
  3525.     Pixmap        /* pixmap */
  3526. #endif
  3527. );
  3528.  
  3529. extern XSetClipOrigin(
  3530. #if NeedFunctionPrototypes
  3531.     Display*        /* display */,
  3532.     GC            /* gc */,
  3533.     int            /* clip_x_origin */,
  3534.     int            /* clip_y_origin */
  3535. #endif
  3536. );
  3537.  
  3538. extern XSetClipRectangles(
  3539. #if NeedFunctionPrototypes
  3540.     Display*        /* display */,
  3541.     GC            /* gc */,
  3542.     int            /* clip_x_origin */,
  3543.     int            /* clip_y_origin */,
  3544.     XRectangle*        /* rectangles */,
  3545.     int            /* n */,
  3546.     int            /* ordering */
  3547. #endif
  3548. );
  3549.  
  3550. extern XSetCloseDownMode(
  3551. #if NeedFunctionPrototypes
  3552.     Display*        /* display */,
  3553.     int            /* close_mode */
  3554. #endif
  3555. );
  3556.  
  3557. extern XSetCommand(
  3558. #if NeedFunctionPrototypes
  3559.     Display*        /* display */,
  3560.     Window        /* w */,
  3561.     char**        /* argv */,
  3562.     int            /* argc */
  3563. #endif
  3564. );
  3565.  
  3566. extern XSetDashes(
  3567. #if NeedFunctionPrototypes
  3568.     Display*        /* display */,
  3569.     GC            /* gc */,
  3570.     int            /* dash_offset */,
  3571.      char*    /* dash_list */,
  3572.     int            /* n */
  3573. #endif
  3574. );
  3575.  
  3576. extern XSetFillRule(
  3577. #if NeedFunctionPrototypes
  3578.     Display*        /* display */,
  3579.     GC            /* gc */,
  3580.     int            /* fill_rule */
  3581. #endif
  3582. );
  3583.  
  3584. extern XSetFillStyle(
  3585. #if NeedFunctionPrototypes
  3586.     Display*        /* display */,
  3587.     GC            /* gc */,
  3588.     int            /* fill_style */
  3589. #endif
  3590. );
  3591.  
  3592. extern XSetFont(
  3593. #if NeedFunctionPrototypes
  3594.     Display*        /* display */,
  3595.     GC            /* gc */,
  3596.     Font        /* font */
  3597. #endif
  3598. );
  3599.  
  3600. extern XSetFontPath(
  3601. #if NeedFunctionPrototypes
  3602.     Display*        /* display */,
  3603.     char**        /* directories */,
  3604.     int            /* ndirs */         
  3605. #endif
  3606. );
  3607.  
  3608. extern XSetForeground(
  3609. #if NeedFunctionPrototypes
  3610.     Display*        /* display */,
  3611.     GC            /* gc */,
  3612.     unsigned long    /* foreground */
  3613. #endif
  3614. );
  3615.  
  3616. extern XSetFunction(
  3617. #if NeedFunctionPrototypes
  3618.     Display*        /* display */,
  3619.     GC            /* gc */,
  3620.     int            /* function */
  3621. #endif
  3622. );
  3623.  
  3624. extern XSetGraphicsExposures(
  3625. #if NeedFunctionPrototypes
  3626.     Display*        /* display */,
  3627.     GC            /* gc */,
  3628.     Bool        /* graphics_exposures */
  3629. #endif
  3630. );
  3631.  
  3632. extern XSetIconName(
  3633. #if NeedFunctionPrototypes
  3634.     Display*        /* display */,
  3635.     Window        /* w */,
  3636.      char*    /* icon_name */
  3637. #endif
  3638. );
  3639.  
  3640. extern XSetInputFocus(
  3641. #if NeedFunctionPrototypes
  3642.     Display*        /* display */,
  3643.     Window        /* focus */,
  3644.     int            /* revert_to */,
  3645.     Time        /* time */
  3646. #endif
  3647. );
  3648.  
  3649. extern XSetLineAttributes(
  3650. #if NeedFunctionPrototypes
  3651.     Display*        /* display */,
  3652.     GC            /* gc */,
  3653.     unsigned int    /* line_width */,
  3654.     int            /* line_style */,
  3655.     int            /* cap_style */,
  3656.     int            /* join_style */
  3657. #endif
  3658. );
  3659.  
  3660. extern int XSetModifierMapping(
  3661. #if NeedFunctionPrototypes
  3662.     Display*        /* display */,
  3663.     XModifierKeymap*    /* modmap */
  3664. #endif
  3665. );
  3666.  
  3667. extern XSetPlaneMask(
  3668. #if NeedFunctionPrototypes
  3669.     Display*        /* display */,
  3670.     GC            /* gc */,
  3671.     unsigned long    /* plane_mask */
  3672. #endif
  3673. );
  3674.  
  3675. extern int XSetPointerMapping(
  3676. #if NeedFunctionPrototypes
  3677.     Display*        /* display */,
  3678.      unsigned char*    /* map */,
  3679.     int            /* nmap */
  3680. #endif
  3681. );
  3682.  
  3683. extern XSetScreenSaver(
  3684. #if NeedFunctionPrototypes
  3685.     Display*        /* display */,
  3686.     int            /* timeout */,
  3687.     int            /* interval */,
  3688.     int            /* prefer_blanking */,
  3689.     int            /* allow_exposures */
  3690. #endif
  3691. );
  3692.  
  3693. extern XSetSelectionOwner(
  3694. #if NeedFunctionPrototypes
  3695.     Display*        /* display */,
  3696.     Atom            /* selection */,
  3697.     Window        /* owner */,
  3698.     Time        /* time */
  3699. #endif
  3700. );
  3701.  
  3702. extern XSetState(
  3703. #if NeedFunctionPrototypes
  3704.     Display*        /* display */,
  3705.     GC            /* gc */,
  3706.     unsigned long     /* foreground */,
  3707.     unsigned long    /* background */,
  3708.     int            /* function */,
  3709.     unsigned long    /* plane_mask */
  3710. #endif
  3711. );
  3712.  
  3713. extern XSetStipple(
  3714. #if NeedFunctionPrototypes
  3715.     Display*        /* display */,
  3716.     GC            /* gc */,
  3717.     Pixmap        /* stipple */
  3718. #endif
  3719. );
  3720.  
  3721. extern XSetSubwindowMode(
  3722. #if NeedFunctionPrototypes
  3723.     Display*        /* display */,
  3724.     GC            /* gc */,
  3725.     int            /* subwindow_mode */
  3726. #endif
  3727. );
  3728.  
  3729. extern XSetTSOrigin(
  3730. #if NeedFunctionPrototypes
  3731.     Display*        /* display */,
  3732.     GC            /* gc */,
  3733.     int            /* ts_x_origin */,
  3734.     int            /* ts_y_origin */
  3735. #endif
  3736. );
  3737.  
  3738. extern XSetTile(
  3739. #if NeedFunctionPrototypes
  3740.     Display*        /* display */,
  3741.     GC            /* gc */,
  3742.     Pixmap        /* tile */
  3743. #endif
  3744. );
  3745.  
  3746. extern XSetWindowBackground(
  3747. #if NeedFunctionPrototypes
  3748.     Display*        /* display */,
  3749.     Window        /* w */,
  3750.     unsigned long    /* background_pixel */
  3751. #endif
  3752. );
  3753.  
  3754. extern XSetWindowBackgroundPixmap(
  3755. #if NeedFunctionPrototypes
  3756.     Display*        /* display */,
  3757.     Window        /* w */,
  3758.     Pixmap        /* background_pixmap */
  3759. #endif
  3760. );
  3761.  
  3762. extern XSetWindowBorder(
  3763. #if NeedFunctionPrototypes
  3764.     Display*        /* display */,
  3765.     Window        /* w */,
  3766.     unsigned long    /* border_pixel */
  3767. #endif
  3768. );
  3769.  
  3770. extern XSetWindowBorderPixmap(
  3771. #if NeedFunctionPrototypes
  3772.     Display*        /* display */,
  3773.     Window        /* w */,
  3774.     Pixmap        /* border_pixmap */
  3775. #endif
  3776. );
  3777.  
  3778. extern XSetWindowBorderWidth(
  3779. #if NeedFunctionPrototypes
  3780.     Display*        /* display */,
  3781.     Window        /* w */,
  3782.     unsigned int    /* width */
  3783. #endif
  3784. );
  3785.  
  3786. extern XSetWindowColormap(
  3787. #if NeedFunctionPrototypes
  3788.     Display*        /* display */,
  3789.     Window        /* w */,
  3790.     Colormap        /* colormap */
  3791. #endif
  3792. );
  3793.  
  3794. extern XStoreBuffer(
  3795. #if NeedFunctionPrototypes
  3796.     Display*        /* display */,
  3797.      char*    /* bytes */,
  3798.     int            /* nbytes */,
  3799.     int            /* buffer */
  3800. #endif
  3801. );
  3802.  
  3803. extern XStoreBytes(
  3804. #if NeedFunctionPrototypes
  3805.     Display*        /* display */,
  3806.      char*    /* bytes */,
  3807.     int            /* nbytes */
  3808. #endif
  3809. );
  3810.  
  3811. extern XStoreColor(
  3812. #if NeedFunctionPrototypes
  3813.     Display*        /* display */,
  3814.     Colormap        /* colormap */,
  3815.     XColor*        /* color */
  3816. #endif
  3817. );
  3818.  
  3819. extern XStoreColors(
  3820. #if NeedFunctionPrototypes
  3821.     Display*        /* display */,
  3822.     Colormap        /* colormap */,
  3823.     XColor*        /* color */,
  3824.     int            /* ncolors */
  3825. #endif
  3826. );
  3827.  
  3828. extern XStoreName(
  3829. #if NeedFunctionPrototypes
  3830.     Display*        /* display */,
  3831.     Window        /* w */,
  3832.     char*    /* window_name */
  3833. #endif
  3834. );
  3835.  
  3836. extern XStoreNamedColor(
  3837. #if NeedFunctionPrototypes
  3838.     Display*        /* display */,
  3839.     Colormap        /* colormap */,
  3840.     char*    /* color */,
  3841.     unsigned long    /* pixel */,
  3842.     int            /* flags */
  3843. #endif
  3844. );
  3845.  
  3846. extern XSync(
  3847. #if NeedFunctionPrototypes
  3848.     Display*        /* display */,
  3849.     Bool        /* discard */
  3850. #endif
  3851. );
  3852.  
  3853. extern XTextExtents(
  3854. #if NeedFunctionPrototypes
  3855.     XFontStruct*    /* font_struct */,
  3856.     char*    /* string */,
  3857.     int            /* nchars */,
  3858.     int*        /* direction_return */,
  3859.     int*        /* font_ascent_return */,
  3860.     int*        /* font_descent_return */,
  3861.     XCharStruct*    /* overall_return */
  3862. #endif
  3863. );
  3864.  
  3865. extern XTextExtents16(
  3866. #if NeedFunctionPrototypes
  3867.     XFontStruct*    /* font_struct */,
  3868.      XChar2b*    /* string */,
  3869.     int            /* nchars */,
  3870.     int*        /* direction_return */,
  3871.     int*        /* font_ascent_return */,
  3872.     int*        /* font_descent_return */,
  3873.     XCharStruct*    /* overall_return */
  3874. #endif
  3875. );
  3876.  
  3877. extern int XTextWidth(
  3878. #if NeedFunctionPrototypes
  3879.     XFontStruct*    /* font_struct */,
  3880.      char*    /* string */,
  3881.     int            /* count */
  3882. #endif
  3883. );
  3884.  
  3885. extern int XTextWidth16(
  3886. #if NeedFunctionPrototypes
  3887.     XFontStruct*    /* font_struct */,
  3888.      XChar2b*    /* string */,
  3889.     int            /* count */
  3890. #endif
  3891. );
  3892.  
  3893. extern Bool XTranslateCoordinates(
  3894. #if NeedFunctionPrototypes
  3895.     Display*        /* display */,
  3896.     Window        /* src_w */,
  3897.     Window        /* dest_w */,
  3898.     int            /* src_x */,
  3899.     int            /* src_y */,
  3900.     int*        /* dest_x_return */,
  3901.     int*        /* dest_y_return */,
  3902.     Window*        /* child_return */
  3903. #endif
  3904. );
  3905.  
  3906. extern XUndefineCursor(
  3907. #if NeedFunctionPrototypes
  3908.     Display*        /* display */,
  3909.     Window        /* w */
  3910. #endif
  3911. );
  3912.  
  3913. extern XUngrabButton(
  3914. #if NeedFunctionPrototypes
  3915.     Display*        /* display */,
  3916.     unsigned int    /* button */,
  3917.     unsigned int    /* modifiers */,
  3918.     Window        /* grab_window */
  3919. #endif
  3920. );
  3921.  
  3922. extern XUngrabKey(
  3923. #if NeedFunctionPrototypes
  3924.     Display*        /* display */,
  3925.     int            /* keycode */,
  3926.     unsigned int    /* modifiers */,
  3927.     Window        /* grab_window */
  3928. #endif
  3929. );
  3930.  
  3931. extern XUngrabKeyboard(
  3932. #if NeedFunctionPrototypes
  3933.     Display*        /* display */,
  3934.     Time        /* time */
  3935. #endif
  3936. );
  3937.  
  3938. extern XUngrabPointer(
  3939. #if NeedFunctionPrototypes
  3940.     Display*        /* display */,
  3941.     Time        /* time */
  3942. #endif
  3943. );
  3944.  
  3945. extern XUngrabServer(
  3946. #if NeedFunctionPrototypes
  3947.     Display*        /* display */
  3948. #endif
  3949. );
  3950.  
  3951. extern XUninstallColormap(
  3952. #if NeedFunctionPrototypes
  3953.     Display*        /* display */,
  3954.     Colormap        /* colormap */
  3955. #endif
  3956. );
  3957.  
  3958. extern XUnloadFont(
  3959. #if NeedFunctionPrototypes
  3960.     Display*        /* display */,
  3961.     Font        /* font */
  3962. #endif
  3963. );
  3964.  
  3965. extern XUnmapSubwindows(
  3966. #if NeedFunctionPrototypes
  3967.     Display*        /* display */,
  3968.     Window        /* w */
  3969. #endif
  3970. );
  3971.  
  3972. extern XUnmapWindow(
  3973. #if NeedFunctionPrototypes
  3974.     Display*        /* display */,
  3975.     Window        /* w */
  3976. #endif
  3977. );
  3978.  
  3979. extern int XVendorRelease(
  3980. #if NeedFunctionPrototypes
  3981.     Display*        /* display */
  3982. #endif
  3983. );
  3984.  
  3985. extern XWarpPointer(
  3986. #if NeedFunctionPrototypes
  3987.     Display*        /* display */,
  3988.     Window        /* src_w */,
  3989.     Window        /* dest_w */,
  3990.     int            /* src_x */,
  3991.     int            /* src_y */,
  3992.     unsigned int    /* src_width */,
  3993.     unsigned int    /* src_height */,
  3994.     int            /* dest_x */,
  3995.     int            /* dest_y */         
  3996. #endif
  3997. );
  3998.  
  3999. extern int XWidthMMOfScreen(
  4000. #if NeedFunctionPrototypes
  4001.     Screen*        /* screen */
  4002. #endif
  4003. );
  4004.  
  4005. extern int XWidthOfScreen(
  4006. #if NeedFunctionPrototypes
  4007.     Screen*        /* screen */
  4008. #endif
  4009. );
  4010.  
  4011. extern XWindowEvent(
  4012. #if NeedFunctionPrototypes
  4013.     Display*        /* display */,
  4014.     Window        /* w */,
  4015.     long        /* event_mask */,
  4016.     XEvent*        /* event_return */
  4017. #endif
  4018. );
  4019.  
  4020. extern int XWriteBitmapFile(
  4021. #if NeedFunctionPrototypes
  4022.     Display*        /* display */,
  4023.     char*    /* filename */,
  4024.     Pixmap        /* bitmap */,
  4025.     unsigned int    /* width */,
  4026.     unsigned int    /* height */,
  4027.     int            /* x_hot */,
  4028.     int            /* y_hot */             
  4029. #endif
  4030. );
  4031.  
  4032. extern Bool XSupportsLocale(
  4033. #if NeedFunctionPrototypes
  4034.     void
  4035. #endif
  4036. );
  4037.  
  4038. extern char *XSetLocaleModifiers(
  4039. #if NeedFunctionPrototypes
  4040.      char*    /* modifier_list */
  4041. #endif
  4042. );
  4043.  
  4044. extern XFontSet XCreateFontSet(
  4045. #if NeedFunctionPrototypes
  4046.     Display*        /* display */,
  4047.      char*    /* base_font_name_list */,
  4048.     char***        /* missing_charset_list */,
  4049.     int*        /* missing_charset_count */,
  4050.     char**        /* def_string */
  4051. #endif
  4052. );
  4053.  
  4054. extern void XFreeFontSet(
  4055. #if NeedFunctionPrototypes
  4056.     Display*        /* display */,
  4057.     XFontSet        /* font_set */
  4058. #endif
  4059. );
  4060.  
  4061. extern int XFontsOfFontSet(
  4062. #if NeedFunctionPrototypes
  4063.     XFontSet        /* font_set */,
  4064.     XFontStruct***    /* font_struct_list */,
  4065.     char***        /* font_name_list */
  4066. #endif
  4067. );
  4068.  
  4069. extern char *XBaseFontNameListOfFontSet(
  4070. #if NeedFunctionPrototypes
  4071.     XFontSet        /* font_set */
  4072. #endif
  4073. );
  4074.  
  4075. extern char *XLocaleOfFontSet(
  4076. #if NeedFunctionPrototypes
  4077.     XFontSet        /* font_set */
  4078. #endif
  4079. );
  4080.  
  4081. extern Bool XContextDependentDrawing(
  4082. #if NeedFunctionPrototypes
  4083.     XFontSet        /* font_set */
  4084. #endif
  4085. );
  4086.  
  4087. extern XFontSetExtents *XExtentsOfFontSet(
  4088. #if NeedFunctionPrototypes
  4089.     XFontSet        /* font_set */
  4090. #endif
  4091. );
  4092.  
  4093. extern int XmbTextEscapement(
  4094. #if NeedFunctionPrototypes
  4095.     XFontSet        /* font_set */,
  4096.      char*    /* text */,
  4097.     int            /* bytes_text */
  4098. #endif
  4099. );
  4100.  
  4101. extern int XwcTextEscapement(
  4102. #if NeedFunctionPrototypes
  4103.     XFontSet        /* font_set */,
  4104.     wchar_t*        /* text */,
  4105.     int            /* num_wchars */
  4106. #endif
  4107. );
  4108.  
  4109. extern int XmbTextExtents(
  4110. #if NeedFunctionPrototypes
  4111.     XFontSet        /* font_set */,
  4112.      char*    /* text */,
  4113.     int            /* bytes_text */,
  4114.     XRectangle*        /* overall_ink_return */,
  4115.     XRectangle*        /* overall_logical_return */
  4116. #endif
  4117. );
  4118.  
  4119. extern int XwcTextExtents(
  4120. #if NeedFunctionPrototypes
  4121.     XFontSet        /* font_set */,
  4122.     wchar_t*        /* text */,
  4123.     int            /* num_wchars */,
  4124.     XRectangle*        /* overall_ink_return */,
  4125.     XRectangle*        /* overall_logical_return */
  4126. #endif
  4127. );
  4128.  
  4129. extern Status XmbTextPerCharExtents(
  4130. #if NeedFunctionPrototypes
  4131.     XFontSet        /* font_set */,
  4132.      char*    /* text */,
  4133.     int            /* bytes_text */,
  4134.     XRectangle*        /* ink_extents_buffer */,
  4135.     XRectangle*        /* logical_extents_buffer */,
  4136.     int            /* buffer_size */,
  4137.     int*        /* num_chars */,
  4138.     XRectangle*        /* overall_ink_return */,
  4139.     XRectangle*        /* overall_logical_return */
  4140. #endif
  4141. );
  4142.  
  4143. extern Status XwcTextPerCharExtents(
  4144. #if NeedFunctionPrototypes
  4145.     XFontSet        /* font_set */,
  4146.     wchar_t*        /* text */,
  4147.     int            /* num_wchars */,
  4148.     XRectangle*        /* ink_extents_buffer */,
  4149.     XRectangle*        /* logical_extents_buffer */,
  4150.     int            /* buffer_size */,
  4151.     int*        /* num_chars */,
  4152.     XRectangle*        /* overall_ink_return */,
  4153.     XRectangle*        /* overall_logical_return */
  4154. #endif
  4155. );
  4156.  
  4157. extern void XmbDrawText(
  4158. #if NeedFunctionPrototypes
  4159.     Display*        /* display */,
  4160.     Drawable        /* d */,
  4161.     GC            /* gc */,
  4162.     int            /* x */,
  4163.     int            /* y */,
  4164.     XmbTextItem*    /* text_items */,
  4165.     int            /* nitems */
  4166. #endif
  4167. );
  4168.  
  4169. extern void XwcDrawText(
  4170. #if NeedFunctionPrototypes
  4171.     Display*        /* display */,
  4172.     Drawable        /* d */,
  4173.     GC            /* gc */,
  4174.     int            /* x */,
  4175.     int            /* y */,
  4176.     XwcTextItem*    /* text_items */,
  4177.     int            /* nitems */
  4178. #endif
  4179. );
  4180.  
  4181. extern void XmbDrawString(
  4182. #if NeedFunctionPrototypes
  4183.     Display*        /* display */,
  4184.     Drawable        /* d */,
  4185.     XFontSet        /* font_set */,
  4186.     GC            /* gc */,
  4187.     int            /* x */,
  4188.     int            /* y */,
  4189.      char*    /* text */,
  4190.     int            /* bytes_text */
  4191. #endif
  4192. );
  4193.  
  4194. extern void XwcDrawString(
  4195. #if NeedFunctionPrototypes
  4196.     Display*        /* display */,
  4197.     Drawable        /* d */,
  4198.     XFontSet        /* font_set */,
  4199.     GC            /* gc */,
  4200.     int            /* x */,
  4201.     int            /* y */,
  4202.     wchar_t*        /* text */,
  4203.     int            /* num_wchars */
  4204. #endif
  4205. );
  4206.  
  4207. extern void XmbDrawImageString(
  4208. #if NeedFunctionPrototypes
  4209.     Display*        /* display */,
  4210.     Drawable        /* d */,
  4211.     XFontSet        /* font_set */,
  4212.     GC            /* gc */,
  4213.     int            /* x */,
  4214.     int            /* y */,
  4215.      char*    /* text */,
  4216.     int            /* bytes_text */
  4217. #endif
  4218. );
  4219.  
  4220. extern void XwcDrawImageString(
  4221. #if NeedFunctionPrototypes
  4222.     Display*        /* display */,
  4223.     Drawable        /* d */,
  4224.     XFontSet        /* font_set */,
  4225.     GC            /* gc */,
  4226.     int            /* x */,
  4227.     int            /* y */,
  4228.     wchar_t*        /* text */,
  4229.     int            /* num_wchars */
  4230. #endif
  4231. );
  4232.  
  4233. extern XIM XOpenIM(
  4234. #if NeedFunctionPrototypes
  4235.     Display*            /* dpy */,
  4236.     struct _XrmHashBucketRec*    /* rdb */,
  4237.     char*            /* res_name */,
  4238.     char*            /* res_class */
  4239. #endif
  4240. );
  4241.  
  4242. extern Status XCloseIM(
  4243. #if NeedFunctionPrototypes
  4244.     XIM /* im */
  4245. #endif
  4246. );
  4247.  
  4248. extern char *XGetIMValues(
  4249. #if NeedVarargsPrototypes
  4250.     XIM /* im */, ...
  4251. #endif
  4252. );
  4253.  
  4254. extern Display *XDisplayOfIM(
  4255. #if NeedFunctionPrototypes
  4256.     XIM /* im */
  4257. #endif
  4258. );
  4259.  
  4260. extern char *XLocaleOfIM(
  4261. #if NeedFunctionPrototypes
  4262.     XIM /* im*/
  4263. #endif
  4264. );
  4265.  
  4266. extern XIC XCreateIC(
  4267. #if NeedVarargsPrototypes
  4268.     XIM /* im */, ...
  4269. #endif
  4270. );
  4271.  
  4272. extern void XDestroyIC(
  4273. #if NeedFunctionPrototypes
  4274.     XIC /* ic */
  4275. #endif
  4276. );
  4277.  
  4278. extern void XSetICFocus(
  4279. #if NeedFunctionPrototypes
  4280.     XIC /* ic */
  4281. #endif
  4282. );
  4283.  
  4284. extern void XUnsetICFocus(
  4285. #if NeedFunctionPrototypes
  4286.     XIC /* ic */
  4287. #endif
  4288. );
  4289.  
  4290. extern wchar_t *XwcResetIC(
  4291. #if NeedFunctionPrototypes
  4292.     XIC /* ic */
  4293. #endif
  4294. );
  4295.  
  4296. extern char *XmbResetIC(
  4297. #if NeedFunctionPrototypes
  4298.     XIC /* ic */
  4299. #endif
  4300. );
  4301.  
  4302. extern char *XSetICValues(
  4303. #if NeedVarargsPrototypes
  4304.     XIC /* ic */, ...
  4305. #endif
  4306. );
  4307.  
  4308. extern char *XGetICValues(
  4309. #if NeedVarargsPrototypes
  4310.     XIC /* ic */, ...
  4311. #endif
  4312. );
  4313.  
  4314. extern XIM XIMOfIC(
  4315. #if NeedFunctionPrototypes
  4316.     XIC /* ic */
  4317. #endif
  4318. );
  4319.  
  4320. extern Bool XFilterEvent(
  4321. #if NeedFunctionPrototypes
  4322.     XEvent*    /* event */,
  4323.     Window    /* window */
  4324. #endif
  4325. );
  4326.  
  4327. extern int XmbLookupString(
  4328. #if NeedFunctionPrototypes
  4329.     XIC            /* ic */,
  4330.     XKeyPressedEvent*    /* event */,
  4331.     char*        /* buffer_return */,
  4332.     int            /* bytes_buffer */,
  4333.     KeySym*        /* keysym_return */,
  4334.     Status*        /* status_return */
  4335. #endif
  4336. );
  4337.  
  4338. extern int XwcLookupString(
  4339. #if NeedFunctionPrototypes
  4340.     XIC            /* ic */,
  4341.     XKeyPressedEvent*    /* event */,
  4342.     wchar_t*        /* buffer_return */,
  4343.     int            /* wchars_buffer */,
  4344.     KeySym*        /* keysym_return */,
  4345.     Status*        /* status_return */
  4346. #endif
  4347. );
  4348.  
  4349. extern XVaNestedList XVaCreateNestedList(
  4350. #if NeedVarargsPrototypes
  4351.     int /*unused*/, ...
  4352. #endif
  4353. );
  4354. #endif
  4355. _XFUNCPROTOEND
  4356.  
  4357.  
  4358. /*
  4359. #ifndef MAKELIBRARY
  4360. #include <X11/X11_pragmas.h>
  4361. #include <X11/Xt_pragmas.h>
  4362. #endif
  4363. */
  4364.  
  4365. #include "amigax:amigax_proto.h"
  4366.  
  4367. #include "unix.h"
  4368.  
  4369. #endif /* _XLIB_H_ */
  4370.